From: Andy Grundman Date: Sat, 22 Oct 2005 18:04:34 +0000 (+0000) Subject: Optimized the path split a bit X-Git-Tag: 5.7099_04~1122 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=commitdiff_plain;h=9cb2e3ae1c1c910231b41aa2324039391be66c66 Optimized the path split a bit --- diff --git a/lib/Catalyst/DispatchType/Default.pm b/lib/Catalyst/DispatchType/Default.pm index 9cd82bf..aa32f9d 100644 --- a/lib/Catalyst/DispatchType/Default.pm +++ b/lib/Catalyst/DispatchType/Default.pm @@ -32,7 +32,7 @@ sub match { $c->namespace( $c->req->path ); $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 }, ( split /\//, $result->[0], 2 )[0]; $c->req->match(''); return 1; }