- Made :Path behave sanely at the root, hopefully
Matt S Trout [Sat, 12 Nov 2005 20:47:11 +0000 (20:47 +0000)]
lib/Catalyst/DispatchType/Path.pm

index ccff553..2cb950d 100644 (file)
@@ -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";