X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=blobdiff_plain;f=lib%2FCatalyst%2FDispatcher.pm;h=7631c860416b1b22db13800631bc810af83e3d28;hp=44f2705f3f87e4e9ab76adcd39c95eba80ef5f00;hb=0fc2d522eec43202c21e9f0062e43f10db4d9008;hpb=5fb12dbb7e69039e0ea22ec4d7cb627206b4508b diff --git a/lib/Catalyst/Dispatcher.pm b/lib/Catalyst/Dispatcher.pm index 44f2705..7631c86 100644 --- a/lib/Catalyst/Dispatcher.pm +++ b/lib/Catalyst/Dispatcher.pm @@ -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