From: Aaron Trevena Date: Wed, 17 Oct 2007 20:57:36 +0000 (+0000) Subject: fix for CGI handler when fatal error, improved makefile X-Git-Tag: 2.13~9 X-Git-Url: https://git.decadent.org.uk/gitweb/?a=commitdiff_plain;h=a4b491683c59a0a505501187742b145eb538eb93;p=maypole.git fix for CGI handler when fatal error, improved makefile git-svn-id: http://svn.maypole.perl.org/Maypole/trunk@583 48953598-375a-da11-a14b-00016c27c3ee --- diff --git a/Changes b/Changes index aed2abf..5ea8bec 100644 --- a/Changes +++ b/Changes @@ -2,6 +2,17 @@ This file documents the revision history for Perl extension Maypole. For information about current developments and future releases, see: http://maypole.perl.org/?TheRoadmap + + +2.13 October 2007 +SVN Revision + +Bug Fixes : + DBD::SQLite no longer required by Makefile.PL + CGI handler now produces response for fatal error (bug 29981) +Improvements : + link macro now takes a target argument, and has slightly better pod + 2.121 29 August 2007 SVN revision 581 diff --git a/Makefile.PL b/Makefile.PL index 3d26362..5b7ca8b 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -13,7 +13,6 @@ WriteMakefile( Class::DBI::Plugin::RetrieveAll => 0, Class::DBI::Loader::Relationship => 0, Class::DBI => 0.96, - Class::DBI::SQLite => 0.08, CGI::Untaint => 1.26, CGI::Untaint::date => 0, CGI::Untaint::email => 0, diff --git a/lib/CGI/Maypole.pm b/lib/CGI/Maypole.pm index df75712..6448480 100644 --- a/lib/CGI/Maypole.pm +++ b/lib/CGI/Maypole.pm @@ -7,7 +7,7 @@ use CGI::Simple; use Maypole::Headers; use Maypole::Constants; -our $VERSION = '2.12'; +our $VERSION = '2.13'; __PACKAGE__->mk_accessors( qw/cgi/ ); @@ -54,10 +54,19 @@ Call this from your CGI script to start the Maypole application. =cut -sub run -{ - my $self = shift; - return $self->handler; +sub run { + my $self = shift; + my $status = $self->handler; + if ($status != OK) { + print <Maypole application error +

Maypole application error

+EOT + } + return $status; } =head1 Implementation diff --git a/lib/Maypole.pm b/lib/Maypole.pm index 325380e..fd39cfa 100644 --- a/lib/Maypole.pm +++ b/lib/Maypole.pm @@ -12,7 +12,7 @@ use URI::QueryParam; use NEXT; use File::MMagic::XS qw(:compat); -our $VERSION = '2.121'; +our $VERSION = '2.13'; our $mmagic = File::MMagic::XS->new(); # proposed privacy conventions: diff --git a/lib/Maypole/templates/factory/macros b/lib/Maypole/templates/factory/macros index d2192bd..ddaeae1 100644 --- a/lib/Maypole/templates/factory/macros +++ b/lib/Maypole/templates/factory/macros @@ -10,12 +10,20 @@ system. This creates an to a command in the Apache::MVC system by catenating the base URL, table, command, and any arguments. +arguments are table, command, additional, label, target. + +target specifies a target for the link if provided. + #%] [% -MACRO link(table, command, additional, label) BLOCK; +MACRO link(table, command, additional, label, target) BLOCK; SET lnk = base _ "/" _ table _ "/" _ command _ "/" _ additional; lnk = lnk | uri ; - ''; + IF target ; + ''; + ELSE; + ''; + END; label | html; ""; END;