- Fixed :Path('') which was annihilated in the Text::ASCIITable removal
Matt S Trout [Fri, 4 Nov 2005 13:48:48 +0000 (13:48 +0000)]
lib/Catalyst/DispatchType/Path.pm

index 31f37b3..c1f1255 100644 (file)
@@ -62,7 +62,10 @@ sub register {
     my @register;
 
     foreach my $r ( @{ $attrs->{Path} || [] } ) {
-        unless ( $r =~ m!^/! ) {    # It's a relative path
+        unless ( $r ) {
+            $r = $action->namespace;
+        }
+        elsif ( $r !~ m!^/! ) {    # It's a relative path
             $r = $action->namespace . "/$r";
         }
         push( @register, $r );