added synopsis to Engine subclassed and documented a couple of methods to make podcov...
Christian Hansen [Thu, 24 Mar 2005 17:54:50 +0000 (17:54 +0000)]
lib/Catalyst/Engine.pm
lib/Catalyst/Engine/Apache.pm
lib/Catalyst/Engine/CGI.pm
lib/Catalyst/Engine/CGI/NPH.pm
lib/Catalyst/Engine/FCGI.pm
lib/Catalyst/Engine/Server.pm
lib/Catalyst/Engine/Test.pm
lib/Catalyst/Log.pm

index 2cbc0f4..7b07f5d 100644 (file)
@@ -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
index 5b48ab6..5f8db71 100644 (file)
@@ -188,6 +188,10 @@ sub prepare_uploads {
     }
 }
 
+=item $c->run
+
+=cut
+
 sub run { }
 
 =back
index 5f930ed..6946e55 100644 (file)
@@ -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<CGI::Simple> object.
@@ -205,6 +201,10 @@ sub prepare_uploads {
     }
 }
 
+=item $c->run
+
+=cut
+
 sub run { shift->handler }
 
 =back
index 51aecbf..30f925e 100644 (file)
@@ -11,7 +11,19 @@ Catalyst::Engine::CGI::NPH - Catalyst CGI Engine
 
 =head1 SYNOPSIS
 
-See L<Catalyst>.
+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
 
index 2f17dc5..07410fd 100644 (file)
@@ -10,7 +10,19 @@ Catalyst::Engine::FCGI - Catalyst FCGI Engine
 
 =head1 SYNOPSIS
 
-See L<Catalyst>.
+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
 
index 468494d..20c0bcc 100644 (file)
@@ -9,7 +9,19 @@ Catalyst::Engine::Server - Catalyst Server Engine
 
 =head1 SYNOPSIS
 
-See L<Catalyst>.
+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
 
index 45da156..df1b8c5 100644 (file)
@@ -14,7 +14,19 @@ Catalyst::Engine::Test - Catalyst Test Engine
 
 =head1 SYNOPSIS
 
-See L<Catalyst>.
+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
 
index 4ae49a0..6bb131a 100644 (file)
@@ -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<Catalyst>.