X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=blobdiff_plain;f=lib%2FCatalyst%2FDispatchType%2FDefault.pm;h=dba3951fbceb410ccc4c3e4500b1d547a3f2c8bb;hp=9cd82bf164bf1971e52dc1edb65ecefcd9ca3793;hb=a9dc674c99f36ff40d94b80753a1504074ba5e22;hpb=7cfcfd27da587caea68fc6240f1cc4c797e9df6f diff --git a/lib/Catalyst/DispatchType/Default.pm b/lib/Catalyst/DispatchType/Default.pm index 9cd82bf..dba3951 100644 --- a/lib/Catalyst/DispatchType/Default.pm +++ b/lib/Catalyst/DispatchType/Default.pm @@ -24,15 +24,15 @@ See L. sub match { my ( $self, $c, $path ) = @_; return if $path =~ m!/!; # Not at root yet, wait for it ... - my $result = @{ $c->get_action( 'default', $c->req->path, 1 ) || [] }[-1]; + my $result = ($c->get_actions('default', $c->req->path))[-1]; # Find default on namespace or super if ($result) { - $c->action( $result->[0] ); - $c->namespace( $c->req->path ); + $c->action( $result ); + $c->namespace( $result->namespace ); $c->req->action('default'); # default methods receive the controller name as the first argument - unshift @{ $c->req->args }, ( split /\//, $result->[0] )[0]; + unshift @{ $c->req->args }, $path; $c->req->match(''); return 1; }