X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FCatalyst%2FController.pm;h=73c647f537fa7d080b3d807db2dbe60bd2755d80;hb=refs%2Fheads%2Fno_path_dispatch;hp=28b54be238cb3529b6ce595dc25bf347191766f6;hpb=5070f11132a769d1468a5be045003c0f70fe8ba0;p=catagits%2FCatalyst-Runtime.git diff --git a/lib/Catalyst/Controller.pm b/lib/Catalyst/Controller.pm index 28b54be..73c647f 100644 --- a/lib/Catalyst/Controller.pm +++ b/lib/Catalyst/Controller.pm @@ -458,7 +458,12 @@ sub _parse_Absolute_attr { shift->_parse_Global_attr(@_); } sub _parse_Local_attr { my ( $self, $c, $name, $value ) = @_; # _parse_attr will call _parse_Path_attr for us - return Path => $name; + $name = join( '/', $self->path_prefix($c), $name); + $name =~ s!^/!!; + return ( + 'Chained' => '/', + 'PathPart' => $name + ); } sub _parse_Relative_attr { shift->_parse_Local_attr(@_); } @@ -467,14 +472,18 @@ sub _parse_Path_attr { my ( $self, $c, $name, $value ) = @_; $value = '' if !defined $value; if ( $value =~ m!^/! ) { - return ( 'Path', $value ); } elsif ( length $value ) { - return ( 'Path', join( '/', $self->path_prefix($c), $value ) ); + $value = join( '/', $self->path_prefix($c), $value ) } else { - return ( 'Path', $self->path_prefix($c) ); + $value = $self->path_prefix($c) } + $value =~ s!^/!!; + return ( + 'Chained' => '/', + 'PathPart' => $value + ); } sub _parse_Chained_attr {