X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=blobdiff_plain;f=lib%2FCatalyst%2FDispatchType%2FChained.pm;h=be76915fa80f4d83d46d0aec4f80b15def114d26;hp=9df62c8aa487a4834aa07f43d6f9be0a4bc3fe2a;hb=7777115595469ccaa4ee132cf0303240fc05a89f;hpb=67e9673e2729bf40b87a20b2afa350be19cd7f5e diff --git a/lib/Catalyst/DispatchType/Chained.pm b/lib/Catalyst/DispatchType/Chained.pm index 9df62c8..be76915 100644 --- a/lib/Catalyst/DispatchType/Chained.pm +++ b/lib/Catalyst/DispatchType/Chained.pm @@ -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])); }