Skip to content

Commit

Permalink
Fix sub-commands detection for bundling
Browse files Browse the repository at this point in the history
  • Loading branch information
polettix committed Mar 26, 2023
1 parent f8fe38d commit bd2b784
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions Changes
Expand Up @@ -2,6 +2,7 @@
- Remove bug in using Params::Validate, addresses
https://github.com/polettix/App-Easer/issues/11, still no test.
- Fix help message for multi-valued defaults
- Fix detecting sub-commands with registered stuff (used in bundling)

2.007001 2023-03-11 15:20:07 CET
- Ensure consistent listing of sub-commands when they are auto-loaded from
Expand Down
5 changes: 3 additions & 2 deletions lib/App/Easer/V2.pm
Expand Up @@ -520,10 +520,11 @@ sub list_children ($self) {
} $self->children_prefixes;
push @autoloaded_children, map {
my $prefix = $_;
my $prefix_length = length($prefix);
grep { !$seen{$_}++ }
grep {
my $this_prefix = substr $_, 0, length $prefix;
$this_prefix eq $prefix;
(substr($_, 0, length $prefix) eq $prefix)
&& (index($_, ':', $prefix_length) < 0);
} keys %App::Easer::V2::registered;
} $self->children_prefixes;

Expand Down

0 comments on commit bd2b784

Please sign in to comment.