Somewhat, but not much more sane. There are still bugs here, but this _should_ fix...
[catagits/Catalyst-Runtime.git] / lib / Catalyst / Dispatcher.pm
index 39eb289..d0e77ac 100644 (file)
@@ -2,7 +2,7 @@ package Catalyst::Dispatcher;
 
 use Moose;
 use Class::MOP;
-with 'MooseX::Emulate::Class::Accessor::Fast';
+with 'MooseX::Emulate::Class::Accessor::Fast' => { excludes => [ 'BUILD' ] };
 
 use Catalyst::Exception;
 use Catalyst::Utils;
@@ -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;