Added support for ~ prefix to plugins and action classes
[catagits/Catalyst-Runtime.git] / lib / Catalyst / Controller.pm
index 05165c1..68e8b42 100644 (file)
@@ -214,7 +214,6 @@ sub register_action_methods {
     foreach my $method (@methods) {
         my $name = $method->name;
         my $attributes = $method->attributes;
-        #next unless $attributes;
         my $attrs = $self->_parse_attrs( $c, $name, @{ $attributes } );
         if ( $attrs->{Private} && ( keys %$attrs > 1 ) ) {
             $c->log->debug( 'Bad action definition "'
@@ -391,7 +390,8 @@ sub _parse_PathPrefix_attr {
 
 sub _parse_ActionClass_attr {
     my ( $self, $c, $name, $value ) = @_;
-    $value = Catalyst::Utils::resolve_namespace($self->_action_class, $value);
+    my $appname = $self->_application;
+    $value = Catalyst::Utils::resolve_namespace($appname . '::Action', $self->_action_class, $value);
     return ( 'ActionClass', $value );
 }