CPAN-Mirror-Tiny

 view release on metacpan or  search on metacpan

lib/CPAN/Mirror/Tiny/CLI.pm  view on Meta::CPAN

    if (my $sub = $self->can("cmd_$_cmd")) {
        return $self->$sub($self->{argv}->@*);
    } else {
        warn "Unknown subcommand '$cmd', try `$0 --help`\n";
        return;
    }

}

sub parse_options ($self, @argv) {
    local @ARGV = @argv;
    my $parser = Getopt::Long::Parser->new(
        config => [qw(no_auto_abbrev no_ignore_case pass_through)],
    );
    $parser->getoptions(
        "h|help" => sub (@) { $self->cmd_help; exit },
        "v|version" => sub (@) { $self->cmd_version; exit },
        "q|quiet" => \$self->{quiet},
        "b|base=s" => \$self->{base},
        "a|author=s" => \$self->{author},
    ) or return 0;



( run in 2.198 seconds using v1.01-cache-2.11-cpan-b9db842bd85 )