summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/Getopt/Dakkar/Role/Command.pm2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/Getopt/Dakkar/Role/Command.pm b/lib/Getopt/Dakkar/Role/Command.pm
index b96c410..8fa491b 100644
--- a/lib/Getopt/Dakkar/Role/Command.pm
+++ b/lib/Getopt/Dakkar/Role/Command.pm
@@ -68,9 +68,11 @@ sub _match_option($self,$arg) {
for my $option ($self->options->@*) {
return $option if $option->match($arg);
}
+ return undef;
}
sub _match_subcommand($self,$arg) {
for my $subcommand ($self->subcommands->@*) {
return $subcommand if $subcommand->match($arg);
}
+ return undef;
}