foreach my $cache (@action_cache) {
my $code = $cache->[0];
- my $method = $methods{$code};
+ my $method = delete $methods{$code}; # avoid dupe registers
next unless $method;
my $attrs = $self->_parse_attrs( $c, $method, @{ $cache->[1] } );
if ( $attrs->{Private} && ( keys %$attrs > 1 ) ) {
my ( $self, $c ) = @_;
my $paths = Text::SimpleTable->new( [ 35, 'Path' ], [ 36, 'Private' ] );
foreach my $path ( sort keys %{ $self->{paths} } ) {
+ my $display_path = $path eq '/' ? $path : "/$path";
foreach my $action ( @{ $self->{paths}->{$path} } ) {
- $path = "/$path" unless $path eq '/';
- $paths->row( "$path", "/$action" );
+ $paths->row( $display_path, "/$action" );
}
}
$c->log->debug( "Loaded Path actions:\n" . $paths->draw )