From: Christian Hansen Date: Thu, 24 Mar 2005 17:54:50 +0000 (+0000) Subject: added synopsis to Engine subclassed and documented a couple of methods to make podcov... X-Git-Tag: 5.7099_04~1691 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=commitdiff_plain;h=c9afa5fc4ed6c36afe6653d7d8fbb9909994c1a8 added synopsis to Engine subclassed and documented a couple of methods to make podcoverage happy --- diff --git a/lib/Catalyst/Engine.pm b/lib/Catalyst/Engine.pm index 2cbc0f4..7b07f5d 100644 --- a/lib/Catalyst/Engine.pm +++ b/lib/Catalyst/Engine.pm @@ -163,7 +163,7 @@ sub set_action { $action = "!$action"; } else { - $c->actions->{plain}->{$action} = [ $namespace, $code ] + $c->actions->{plain}->{$action} = [ $namespace, $code ]; } my $reverse = $prefix ? "$action ($prefix)" : $action; @@ -601,7 +601,7 @@ sub prepare_action { if ( $c->debug && @args ); } -=item $c->prepare_connection; +=item $c->prepare_connection Prepare connection. @@ -609,7 +609,7 @@ Prepare connection. sub prepare_connection { } -=item $c->prepare_cookies; +=item $c->prepare_cookies Prepare cookies. @@ -689,6 +689,14 @@ sub process { return $status; } +=item $c->run + +Starts the engine. + +=cut + +sub run { } + =item $c->request =item $c->req diff --git a/lib/Catalyst/Engine/Apache.pm b/lib/Catalyst/Engine/Apache.pm index 5b48ab6..5f8db71 100644 --- a/lib/Catalyst/Engine/Apache.pm +++ b/lib/Catalyst/Engine/Apache.pm @@ -188,6 +188,10 @@ sub prepare_uploads { } } +=item $c->run + +=cut + sub run { } =back diff --git a/lib/Catalyst/Engine/CGI.pm b/lib/Catalyst/Engine/CGI.pm index 5f930ed..6946e55 100644 --- a/lib/Catalyst/Engine/CGI.pm +++ b/lib/Catalyst/Engine/CGI.pm @@ -53,10 +53,6 @@ useful in production applications, but it may be helpful for development. =over 4 -=item $c->run - -To be called from a CGI script to start the Catalyst application. - =item $c->cgi This config parameter contains the C object. @@ -205,6 +201,10 @@ sub prepare_uploads { } } +=item $c->run + +=cut + sub run { shift->handler } =back diff --git a/lib/Catalyst/Engine/CGI/NPH.pm b/lib/Catalyst/Engine/CGI/NPH.pm index 51aecbf..30f925e 100644 --- a/lib/Catalyst/Engine/CGI/NPH.pm +++ b/lib/Catalyst/Engine/CGI/NPH.pm @@ -11,7 +11,19 @@ Catalyst::Engine::CGI::NPH - Catalyst CGI Engine =head1 SYNOPSIS -See L. +A script using the Catalyst::Engine::CGI::NPH module might look like: + + #!/usr/bin/perl -w + + BEGIN { + $ENV{CATALYST_ENGINE} = 'CGI::NPH'; + } + + use strict; + use lib '/path/to/MyApp/lib'; + use MyApp; + + MyApp->run; =head1 DESCRIPTION diff --git a/lib/Catalyst/Engine/FCGI.pm b/lib/Catalyst/Engine/FCGI.pm index 2f17dc5..07410fd 100644 --- a/lib/Catalyst/Engine/FCGI.pm +++ b/lib/Catalyst/Engine/FCGI.pm @@ -10,7 +10,19 @@ Catalyst::Engine::FCGI - Catalyst FCGI Engine =head1 SYNOPSIS -See L. +A script using the Catalyst::Engine::FCGI module might look like: + + #!/usr/bin/perl -w + + BEGIN { + $ENV{CATALYST_ENGINE} = 'FCGI'; + } + + use strict; + use lib '/path/to/MyApp/lib'; + use MyApp; + + MyApp->run; =head1 DESCRIPTION diff --git a/lib/Catalyst/Engine/Server.pm b/lib/Catalyst/Engine/Server.pm index 468494d..20c0bcc 100644 --- a/lib/Catalyst/Engine/Server.pm +++ b/lib/Catalyst/Engine/Server.pm @@ -9,7 +9,19 @@ Catalyst::Engine::Server - Catalyst Server Engine =head1 SYNOPSIS -See L. +A script using the Catalyst::Engine::Server module might look like: + + #!/usr/bin/perl -w + + BEGIN { + $ENV{CATALYST_ENGINE} = 'Server'; + } + + use strict; + use lib '/path/to/MyApp/lib'; + use MyApp; + + MyApp->run; =head1 DESCRIPTION diff --git a/lib/Catalyst/Engine/Test.pm b/lib/Catalyst/Engine/Test.pm index 45da156..df1b8c5 100644 --- a/lib/Catalyst/Engine/Test.pm +++ b/lib/Catalyst/Engine/Test.pm @@ -14,7 +14,19 @@ Catalyst::Engine::Test - Catalyst Test Engine =head1 SYNOPSIS -See L. +A script using the Catalyst::Engine::Test module might look like: + + #!/usr/bin/perl -w + + BEGIN { + $ENV{CATALYST_ENGINE} = 'Test'; + } + + use strict; + use lib '/path/to/MyApp/lib'; + use MyApp; + + MyApp->run('/a/path'); =head1 DESCRIPTION diff --git a/lib/Catalyst/Log.pm b/lib/Catalyst/Log.pm index 4ae49a0..6bb131a 100644 --- a/lib/Catalyst/Log.pm +++ b/lib/Catalyst/Log.pm @@ -42,8 +42,6 @@ Logs a debugging message. sub debug { shift->_format( 'debug', @_ ) } -sub dump { shift->_format( 'dump', Dumper( $_[1] ) ) } - =item $log->error(@message) Logs an error message. @@ -78,6 +76,20 @@ sub _format { =back +=head1 DEPRECATED METHODS + +=over 4 + +=item $log->dump($reference) + +Logs a Data::Dumper of reference. + +=cut + +sub dump { shift->_format( 'dump', Dumper( $_[1] ) ) } + +=back + =head1 SEE ALSO L.