Merge revert 8df53bed
[catagits/Catalyst-Runtime.git] / lib / Catalyst / DispatchType / Chained.pm
index 9df62c8..be76915 100644 (file)
@@ -105,7 +105,7 @@ sub list {
             if (my $cap = $curr->attributes->{CaptureArgs}) {
                 unshift(@parts, (("*") x $cap->[0]));
             }
-            if (my $pp = $curr->attributes->{PartPath}) {
+            if (my $pp = $curr->attributes->{PathPart}) {
                 unshift(@parts, $pp->[0])
                     if (defined $pp->[0] && length $pp->[0]);
             }
@@ -235,9 +235,7 @@ sub recurse_match {
                     local $c->req->{arguments} = [ @{$c->req->args}, @parts ];
                     next TRY_ACTION unless $action->match($c);
                 }
-
-                # Default args is blank, not 0, since Args()
-                my $args_attr = $action->attributes->{Args}->[0] || '';
+                my $args_attr = $action->attributes->{Args}->[0];
 
                 #    No best action currently
                 # OR This one matches with fewer parts left than the current best action,
@@ -306,7 +304,7 @@ sub register {
         );
     }
 
-    $action->attributes->{PartPath} = [ $part ];
+    $action->attributes->{PathPart} = [ $part ];
 
     unshift(@{ $children->{$part} ||= [] }, $action);
 
@@ -360,7 +358,7 @@ sub uri_for_action {
                 unshift(@parts, splice(@captures, -$cap->[0]));
             }
         }
-        if (my $pp = $curr->attributes->{PartPath}) {
+        if (my $pp = $curr->attributes->{PathPart}) {
             unshift(@parts, $pp->[0])
                 if (defined($pp->[0]) && length($pp->[0]));
         }