Pass $c along to path_prefix in _parse_PathPrefix_attr.
Florian Ragwitz [Sun, 28 Jun 2009 14:58:16 +0000 (14:58 +0000)]
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.

lib/Catalyst/Controller.pm

index 45feacb..548b4a1 100644 (file)
@@ -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 {