- Made Action accessor names more consistent (namespace -> class, prefix -> namespace)
[catagits/Catalyst-Runtime.git] / lib / Catalyst / DispatchType / Path.pm
index 43dc890..81603d5 100644 (file)
@@ -26,7 +26,7 @@ sub list {
     my ( $self, $c ) = @_;
     my $paths = Text::ASCIITable->new;
     $paths->setCols( 'Path', 'Private' );
-    $paths->setColWidth( 'Public',  36, 1 );
+    $paths->setColWidth( 'Path',  36, 1 );
     $paths->setColWidth( 'Private', 37, 1 );
     for my $path ( sort keys %{ $self->{paths} } ) {
         my $action = $self->{paths}->{$path};
@@ -47,7 +47,7 @@ sub match {
         $c->req->action($path);
         $c->req->match($path);
         $c->action($action);
-        $c->namespace( $action->prefix );
+        $c->namespace( $action->namespace );
         return 1;
     }
 
@@ -66,7 +66,7 @@ sub register {
 
     foreach my $r ( @{ $attrs->{Path} || [] } ) {
         unless ( $r =~ m!^/! ) {    # It's a relative path
-            $r = $action->prefix . "/$r";
+            $r = $action->namespace . "/$r";
         }
         push( @register, $r );
     }
@@ -76,7 +76,7 @@ sub register {
     }
 
     if ( $attrs->{Local} || $attrs->{Relative} ) {
-        push( @register, join( '/', $action->prefix, $action->name ) );
+        push( @register, join( '/', $action->namespace, $action->name ) );
 
         # Register sub name as a relative path
     }