From: Matt S Trout Date: Fri, 4 Nov 2005 13:48:48 +0000 (+0000) Subject: - Fixed :Path('') which was annihilated in the Text::ASCIITable removal X-Git-Tag: 5.7099_04~1018 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=commitdiff_plain;h=621a5d5e7c8c9aabcca1601857102d1fd1d7d4f2 - Fixed :Path('') which was annihilated in the Text::ASCIITable removal --- diff --git a/lib/Catalyst/DispatchType/Path.pm b/lib/Catalyst/DispatchType/Path.pm index 31f37b3..c1f1255 100644 --- a/lib/Catalyst/DispatchType/Path.pm +++ b/lib/Catalyst/DispatchType/Path.pm @@ -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 );