From: Florian Ragwitz Date: Sun, 28 Jun 2009 14:58:16 +0000 (+0000) Subject: Pass $c along to path_prefix in _parse_PathPrefix_attr. X-Git-Tag: 5.80006~14 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=commitdiff_plain;h=028255514f179a452404752e5700d35c5edb3860 Pass $c along to path_prefix in _parse_PathPrefix_attr. This prevents things from blowing up if the controller instance doesn't know about its action namespace already, when the attribute value is being parsed. Closes RT#42816. Courtesy of Jason Kohles. --- diff --git a/lib/Catalyst/Controller.pm b/lib/Catalyst/Controller.pm index 45feacb..548b4a1 100644 --- a/lib/Catalyst/Controller.pm +++ b/lib/Catalyst/Controller.pm @@ -384,8 +384,8 @@ sub _parse_ChainedParent_attr { } sub _parse_PathPrefix_attr { - my $self = shift; - return PathPart => $self->path_prefix; + my ( $self, $c ) = @_; + return PathPart => $self->path_prefix($c); } sub _parse_ActionClass_attr {