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=f1f6e75f068b57dd13f5b7d148f940077d19fb88;hpb=4ba7161b972209ab0e923862485624cc651c65f2;p=catagits%2FCatalyst-Runtime.git diff --git a/lib/Catalyst/Controller.pm b/lib/Catalyst/Controller.pm index f1f6e75..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 { @@ -751,7 +760,7 @@ This is a general toolbox for attaching your action to a give path. =head2 Regexp -Status: Deprecated. Use Chained methods or other techniques. +B Use Chained methods or other techniques. If you really depend on this, install the standalone L distribution. @@ -761,7 +770,7 @@ A global way to match a give regular expression in the incoming request path. =head2 LocalRegexp -Status: Deprecated. Use Chained methods or other techniques. +B Use Chained methods or other techniques. If you really depend on this, install the standalone L distribution.