X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FCatalyst%2FController.pm;h=afa3e3f78b0cfb3b24d59600d370d1bc9f5e14ca;hb=976220fb6507cadfbeebdd98e30861e2636e9b14;hp=15941723e2c16eba26572073bd67c5821e969f47;hpb=9c1fc6d6a8c4701fa842fa5229c99d103aee1afa;p=catagits%2FCatalyst-Runtime.git diff --git a/lib/Catalyst/Controller.pm b/lib/Catalyst/Controller.pm index 1594172..afa3e3f 100644 --- a/lib/Catalyst/Controller.pm +++ b/lib/Catalyst/Controller.pm @@ -458,7 +458,10 @@ 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; + return ( + 'Chained' => '/', + 'PathPart' => join( '/', $self->path_prefix($c), $name) + ); } sub _parse_Relative_attr { shift->_parse_Local_attr(@_); } @@ -466,14 +469,23 @@ sub _parse_Relative_attr { shift->_parse_Local_attr(@_); } sub _parse_Path_attr { my ( $self, $c, $name, $value ) = @_; $value = '' if !defined $value; - if ( $value =~ m!^/! ) { - return ( 'Path', $value ); + if ( $value =~ s!^/!! ) { + return ( + 'Chained' => '/', + 'PathPart' => $value + ); } elsif ( length $value ) { - return ( 'Path', join( '/', $self->path_prefix($c), $value ) ); + return ( + 'Chained' => '/', + 'PathPart' => join( '/', $self->path_prefix($c), $value ) + ); } else { - return ( 'Path', $self->path_prefix($c) ); + return ( + 'Chained' => '/', + 'PathPart' => $self->path_prefix($c) + ); } } @@ -649,7 +661,7 @@ overridden from the "namespace" config key. =head2 $self->path_prefix($c) -Returns the default path prefix for :PathPrefix, :Local, :LocalRegex and +Returns the default path prefix for :PathPrefix, :Local and relative :Path actions in this component. Defaults to the action_namespace or can be overridden from the "path" config key. @@ -751,7 +763,9 @@ 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. A global way to match a give regular expression in the incoming request path. @@ -759,6 +773,10 @@ A global way to match a give regular expression in the incoming request path. =head2 LocalRegexp +B Use Chained methods or other techniques. +If you really depend on this, install the standalone +L distribution. + Like L but scoped under the namespace of the containing controller =head2 Chained