X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=blobdiff_plain;f=lib%2FCatalyst.pm;h=1adf5576a326670f32394729986e12a5c4a64471;hp=7d6e4fa98db0fb295c4fcd5a63b0ec536d761989;hb=8767c5a3e3e357113d0092cef50d81f358be8b92;hpb=fef4e5e8039245c106685475bde99721fa09d3e9 diff --git a/lib/Catalyst.pm b/lib/Catalyst.pm index 7d6e4fa..1adf557 100644 --- a/lib/Catalyst.pm +++ b/lib/Catalyst.pm @@ -24,8 +24,7 @@ __PACKAGE__->mk_accessors( attributes->import( __PACKAGE__, \&namespace, 'lvalue' ); -sub depth { scalar @{shift->stack||[]}; } -#sub namespace { my $a = shift->stack->[-1]; ($a ? $a->namespace : ''); } +sub depth { scalar @{ shift->stack || [] }; } # Laziness++ *comp = \&component; @@ -862,7 +861,7 @@ sub execute { $action = "-> $action" if $callsub =~ /forward$/; } - push(@{$c->stack}, $code); + push( @{ $c->stack }, $code ); eval { if ( $c->debug ) { @@ -879,7 +878,7 @@ sub execute { $c->state( &$code( $class, $c, @{ $c->req->args } ) || 0 ); } }; - pop(@{$c->stack}); + pop( @{ $c->stack } ); if ( my $error = $@ ) { @@ -1670,6 +1669,10 @@ sub setup_plugins { } } +=item $c->stack + +Contains the stack. + =item $c->write( $data ) Writes $data to the output stream. When using this method directly, you will