From: Matt S Trout Date: Sat, 12 Nov 2005 20:47:11 +0000 (+0000) Subject: - Made :Path behave sanely at the root, hopefully X-Git-Tag: 5.7099_04~941 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=commitdiff_plain;h=18339b159f0d0dd7c057a3f959c30f4777bb4f91 - Made :Path behave sanely at the root, hopefully --- diff --git a/lib/Catalyst/DispatchType/Path.pm b/lib/Catalyst/DispatchType/Path.pm index ccff553..2cb950d 100644 --- a/lib/Catalyst/DispatchType/Path.pm +++ b/lib/Catalyst/DispatchType/Path.pm @@ -64,6 +64,7 @@ sub register { foreach my $r ( @{ $attrs->{Path} || [] } ) { unless ($r) { $r = $action->namespace; + $r = '' if $r eq '/'; } elsif ( $r !~ m!^/! ) { # It's a relative path $r = $action->namespace . "/$r";