Shut up recursion warnings
Marcus Ramberg [Sat, 18 Apr 2009 14:41:50 +0000 (14:41 +0000)]
lib/Catalyst.pm
lib/Catalyst/Dispatcher.pm

index 7368674..d44c2ca 100644 (file)
@@ -1480,6 +1480,7 @@ sub execute {
 
     push( @{ $c->stack }, $code );
     
+    no warnings 'recursion';
     eval { $c->state( $code->execute( $class, $c, @{ $c->req->args } ) || 0 ) };
 
     $c->_stats_finish_execute( $stats_info ) if $c->use_stats and $stats_info;
index 39eb289..a8de12b 100644 (file)
@@ -15,6 +15,7 @@ use Text::SimpleTable;
 use Tree::Simple;
 use Tree::Simple::Visitor::FindByPath;
 
+
 # Refactoring note:
 # do these belong as package vars or should we build these via a builder method?
 # See Catalyst-Plugin-Server for them being added to, which should be much less ugly.
@@ -236,6 +237,7 @@ Documented in L<Catalyst>
 
 sub forward {
     my $self = shift;
+    no warnings 'recursion';
     $self->_do_forward(forward => @_);
 }
 
@@ -253,9 +255,9 @@ sub _do_forward {
         return 0;
     }
 
-    no warnings 'recursion';
 
     local $c->request->{arguments} = $args;
+    no warnings 'recursion';
     $action->dispatch( $c );
 
     return $c->state;