start using Class::C3, may need to add a reinitalize bit later, not sure
[catagits/Catalyst-Runtime.git] / lib / Catalyst / Dispatcher.pm
index 44f2705..7631c86 100644 (file)
@@ -171,10 +171,11 @@ sub forward {
 
     no warnings 'recursion';
 
-    #moose todo: reaching inside another object is bad
-    local $c->request->{arguments} = \@args;
+    my $orig_args = $c->request->arguments();
+    $c->request->arguments(\@args);
     $action->dispatch( $c );
-
+    $c->request->arguments($orig_args);
+    
     return $c->state;
 }
 
@@ -282,7 +283,6 @@ sub prepare_action {
         unshift @args, $arg;
     }
 
-    #Moose todo: This seems illegible, even if efficient.
     s/%([0-9A-Fa-f]{2})/chr(hex($1))/eg for grep { defined } @{$req->captures||[]};
 
     $c->log->debug( 'Path is "' . $req->match . '"' )
@@ -519,7 +519,7 @@ sub _load_dispatch_types {
     for my $type (@types) {
         my $class =
           ( $type =~ /^\+(.*)$/ ) ? $1 : "Catalyst::DispatchType::${type}";
-        #eval "require $class";
+
         eval { Class::MOP::load_class($class) };
         Catalyst::Exception->throw( message => qq/Couldn't load "$class"/ )
           if $@;
@@ -531,6 +531,7 @@ sub _load_dispatch_types {
     return @loaded;
 }
 
+no Moose;
 __PACKAGE__->meta->make_immutable;
 
 =head2 meta