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;fp=lib%2FCatalyst%2FDispatchType%2FChained.pm;h=421175f0c48c2894c60ac0f39affac89d4bd4c10;hp=f9e49fa1f6ce18e3ddf972621c34c3d0acf7acf3;hb=79b7db20af61e914389b144e57bb7edfd107743c;hpb=90102012feccf317d3ed075ea8dc04c2cee95fb5 diff --git a/lib/Catalyst/DispatchType/Chained.pm b/lib/Catalyst/DispatchType/Chained.pm index f9e49fa..421175f 100644 --- a/lib/Catalyst/DispatchType/Chained.pm +++ b/lib/Catalyst/DispatchType/Chained.pm @@ -98,7 +98,7 @@ sub list { @{ $self->_endpoints } ) { my $args = $endpoint->list_extra_info->{Args}; - my @parts = (defined($args) ? (("*") x $args) : '...'); + my @parts = (defined($endpoint->attributes->{Args}[0]) ? (("*") x $args) : '...'); my @parents = (); my $parent = "DUMMY"; my $extra = $self->_list_extra_http_methods($endpoint); @@ -150,13 +150,11 @@ sub list { push(@rows, [ '', $name ]); } - if(defined $endpoint->number_of_args) { - if($endpoint->has_args_constraints) { - my $tc = join ',', @{$endpoint->args_constraints}; - $endpoint .= " ($tc)"; - } else { - $endpoint .= " (${\$endpoint->number_of_args})"; - } + if($endpoint->has_args_constraints) { + my $tc = join ',', @{$endpoint->args_constraints}; + $endpoint .= " ($tc)"; + } else { + $endpoint .= defined($endpoint->attributes->{Args}[0]) ? " ($args)" : " (...)"; } push(@rows, [ '', (@rows ? "=> " : '').($extra ? "$extra " : ''). ($scheme ? "$scheme: ":'')."/${endpoint}". ($consumes ? " :$consumes":"" ) ]); my @display_parts = map { $_ =~s/%([0-9A-Fa-f]{2})/chr(hex($1))/eg; decode_utf8 $_ } @parts;