Clarify inner package behavior of companent instantation in the POD. (no 1 of 2 doc...
[catagits/Catalyst-Runtime.git] / lib / Catalyst.pm
index a75f43b..c235127 100644 (file)
@@ -49,6 +49,7 @@ our $COUNT     = 1;
 our $START     = time;
 our $RECURSION = 1000;
 our $DETACH    = "catalyst_detach\n";
+our $GO        = "catalyst_go\n";
 
 __PACKAGE__->mk_classdata($_)
   for qw/components arguments dispatcher engine log dispatcher_class
@@ -63,7 +64,7 @@ __PACKAGE__->stats_class('Catalyst::Stats');
 
 # Remember to update this in Catalyst::Runtime as well!
 
-our $VERSION = '5.7014';
+our $VERSION = '5.7099_01';
 
 sub import {
     my ( $class, @arguments ) = @_;
@@ -327,6 +328,20 @@ When called with no arguments it escapes the processing chain entirely.
 
 sub detach { my $c = shift; $c->dispatcher->detach( $c, @_ ) }
 
+=head2 $c->go( $action [, \@arguments ] )
+
+=head2 $c->go( $class, $method, [, \@arguments ] )
+
+Almost the same as C<detach>, but does a full dispatch, instead of just
+calling the new C<$action> / C<$class-E<gt>$method>. This means that C<begin>,
+C<auto> and the method you go to is called, just like a new request.
+
+C<$c-E<gt>stash> is kept unchanged.
+
+=cut
+
+sub go { my $c = shift; $c->dispatcher->go( $c, @_ ) }
+
 =head2 $c->response
 
 =head2 $c->res
@@ -1260,7 +1275,12 @@ sub execute {
     my $last = pop( @{ $c->stack } );
 
     if ( my $error = $@ ) {
-        if ( !ref($error) and $error eq $DETACH ) { die $DETACH if $c->depth > 1 }
+        if ( !ref($error) and $error eq $DETACH ) {
+            die $DETACH if($c->depth > 1);
+        }
+        elsif ( !ref($error) and $error eq $GO ) {
+            die $GO if($c->depth > 0);
+        }
         else {
             unless ( ref $error ) {
                 no warnings 'uninitialized';
@@ -1886,6 +1906,11 @@ search paths, specify a key named C<search_extra> as an array
 reference. Items in the array beginning with C<::> will have the
 application class name prepended to them.
 
+All components found will also have any 
+L<Devel::InnerPackage|inner packages> loaded and set up as components.
+Note, that modules which are B<not> an I<inner package> of the main
+file namespace loaded will not be instantiated as components.
+
 =cut
 
 sub setup_components {
@@ -2391,13 +2416,15 @@ Wiki:
 
 =head2 L<Catalyst::Test> - The test suite.
 
-=head1 CREDITS
+=head1 PROJECT FOUNDER
 
-Andy Grundman
+sri: Sebastian Riedel <sri@cpan.org>
 
-Andy Wardley
+=head1 CONTRIBUTORS
 
-Andreas Marienborg
+abw: Andy Wardley
+
+acme: Leon Brocard <leon@astray.com>
 
 Andrew Bramble
 
@@ -2405,65 +2432,67 @@ Andrew Ford
 
 Andrew Ruthven
 
-Arthur Bergman
+andyg: Andy Grundman <andy@hybridized.org>
 
-Autrijus Tang
+audreyt: Audrey Tang
 
-Brian Cassidy
+bricas: Brian Cassidy <bricas@cpan.org>
 
-Carl Franks
+chansen: Christian Hansen
 
-Christian Hansen
+chicks: Christopher Hicks
 
-Christopher Hicks
+dkubb: Dan Kubb <dan.kubb-cpan@onautopilot.com>
 
-Dan Sully
+Drew Taylor
 
-Danijel Milicevic
+esskar: Sascha Kiefer
 
-David Kamholz
+fireartist: Carl Franks <cfranks@cpan.org>
 
-David Naughton
-
-Drew Taylor
+gabb: Danijel Milicevic
 
 Gary Ashton Jones
 
 Geoff Richards
 
-Jesse Sheidlower
-
-Jesse Vincent
+jcamacho: Juan Camacho
 
 Jody Belka
 
 Johan Lindstrom
 
-Juan Camacho
+jon: Jon Schutz <jjschutz@cpan.org>
 
-Leon Brocard
+marcus: Marcus Ramberg <mramberg@cpan.org>
 
-Marcus Ramberg
+miyagawa: Tatsuhiko Miyagawa <miyagawa@bulknews.net>
 
-Matt S Trout
+mst: Matt S. Trout <mst@shadowcatsystems.co.uk>
 
-Robert Sedlacek
+mugwump: Sam Vilain
 
-Sam Vilain
+naughton: David Naughton
 
-Sascha Kiefer
+ningu: David Kamholz <dkamholz@cpan.org>
 
-Sebastian Willert
+nothingmuch: Yuval Kogman <nothingmuch@woobling.org>
 
-Tatsuhiko Miyagawa
+numa: Dan Sully <daniel@cpan.org>
 
-Ulf Edvinsson
+obra: Jesse Vincent
+
+omega: Andreas Marienborg
+
+phaylon: Robert Sedlacek <phaylon@dunkelheit.at>
 
-Yuval Kogman
+sky: Arthur Bergman
 
-=head1 AUTHOR
+the_jester: Jesse Sheidlower
+
+Ulf Edvinsson
 
-Sebastian Riedel, C<sri@oook.de>
+willert: Sebastian Willert <willert@cpan.org>
 
 =head1 LICENSE