Skip to content

Commit

Permalink
avoid dynamic regex
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Feb 19, 2015
1 parent b589b5b commit a7fb3a4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Mojolicious/Commands.pm
Expand Up @@ -63,7 +63,7 @@ sub run {
for my $ns (@{$self->namespaces}) {
for my $module (@{$loader->search($ns)}) {
next unless my $command = _command($module);
$command =~ s/^\Q$ns\E:://;
$command = substr $command, length "${ns}::";
next if $seen{$command}++;
push @rows, [" $command", $module->new->description];
}
Expand Down

0 comments on commit a7fb3a4

Please sign in to comment.