From: Marcus Ramberg Date: Fri, 15 Apr 2005 12:56:32 +0000 (+0000) Subject: Fixed: Minor typo in Intro.pod X-Git-Tag: 5.7099_04~1526 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=commitdiff_plain;h=42a57832aea5e5c4684d534aa7d133c15aac4b42 Fixed: Minor typo in Intro.pod Added: Support for script generations Fixed: report correct class in abstract Base::process --- diff --git a/lib/Catalyst.pm b/lib/Catalyst.pm index e7cc9a9..829f72b 100644 --- a/lib/Catalyst.pm +++ b/lib/Catalyst.pm @@ -4,6 +4,7 @@ use strict; use base 'Catalyst::Base'; use UNIVERSAL::require; use Catalyst::Log; +use Catalyst::Helper; use Text::ASCIITable; __PACKAGE__->mk_classdata($_) for qw/dispatcher engine log/; @@ -133,7 +134,7 @@ sub import { } if ( $caller->engine ) { - return; # Catalyst is allready initialized + return; # Catalyst is already initialized } unless ( $caller->log ) { @@ -163,6 +164,12 @@ sub import { } } + $caller->log->info("You are running an old helper script! ". + "Please update your scripts by regenerating the ". + "application and copying over the new scripts.") + if ( $ENV{CATALYST_SCRIPT_GEN} && ( + $ENV{CATALYST_SCRIPT_GEN} < + $Catalyst::Helper::CATALYST_SCRIPT_GEN )) ; # Process options my @plugins; foreach (@options) { diff --git a/lib/Catalyst/Base.pm b/lib/Catalyst/Base.pm index 1e1d585..a79cfa2 100644 --- a/lib/Catalyst/Base.pm +++ b/lib/Catalyst/Base.pm @@ -95,7 +95,7 @@ sub config { =cut -sub process { die __PACKAGE__." did not override process."; } +sub process { die ((ref $_[0] || $_[0])." did not override Catalyst::Base::process"); } =back diff --git a/lib/Catalyst/Helper.pm b/lib/Catalyst/Helper.pm index 8dab1c3..f4f2110 100644 --- a/lib/Catalyst/Helper.pm +++ b/lib/Catalyst/Helper.pm @@ -8,6 +8,7 @@ use File::Path; use IO::File; use FindBin; use Template; +our $CATALYST_SCRIPT_GEN = 2; my %cache; @@ -58,6 +59,7 @@ sub mk_app { $self->{dir} = $name; $self->{dir} =~ s/\:\:/-/g; $self->{startperl} = $Config{startperl}; + $self->{scriptgen}=$CATALYST_SCRIPT_GEN; $self->_mk_dirs; $self->_mk_appclass; $self->_mk_makefile; @@ -535,7 +537,10 @@ the same terms as perl itself. __server__ [% startperl %] -w -BEGIN { $ENV{CATALYST_ENGINE} = 'HTTP' } +BEGIN { + $ENV{CATALYST_ENGINE} = 'HTTP'; + $ENV{CATALYST_SCRIPT_GEN} = [% scriptgen %]; +} use strict; use Getopt::Long; diff --git a/lib/Catalyst/Manual/Intro.pod b/lib/Catalyst/Manual/Intro.pod index 407daa7..28a08d6 100644 --- a/lib/Catalyst/Manual/Intro.pod +++ b/lib/Catalyst/Manual/Intro.pod @@ -339,7 +339,7 @@ but before your action is processed. MyApp::begin MyApp::auto - MyApp::default + MyApp::C::Foo::default MyApp::end =item for a request for /foo/bar/foo