package Getopt::Dakkar; use Getopt::Dakkar::Style qw(class); # VERSION # ABSTRACT: the best command line parser ever with 'Getopt::Dakkar::Role::Command'; has '+name' => ( default => $0 ); has '+class' => ( default => 'Getopt::Dakkar::Stash' ); sub parse($self,$args=\@ARGV,$=) { my $stash = $self->_parse($args,undef) // $self->make_stash(Getopt::Dakkar::ArgPack->new()); # we're top-level, we should really have used all the command line # elements if ($args->@*) { Getopt::Dakkar::X::ExtraArgs->throw({ args => $args, }); } return $stash; }