App-revealup

 view release on metacpan or  search on metacpan

lib/App/revealup/cli.pm  view on Meta::CPAN

package App::revealup::cli;
use App::revealup::base;

# For compatibility.
has 'command_map' => {
    server => 'serve',
    theme => 'export',
};

sub run {
    my ($self, @args) = @_;

    local @ARGV = @args;
    my @commands;
    push @commands, @ARGV;
    my $command = shift @commands;

    if($command) {
        my $new_command = $self->command_map->{$command};
        $command = $new_command if $new_command;
        my $klass = sprintf("App::revealup::cli::%s", lc($command));
        no warnings 'ambiguous';
        if(eval "require $klass;1;"){
            my $instance = $klass->new();
            $instance->run(@commands);
            return;
        }
    }
    system "perldoc App::revealup";
}

1;

 view all matches for this distribution
 view release on metacpan -  search on metacpan

( run in 1.942 second using v1.00-cache-2.02-grep-82fe00e-cpan-f5108d614456 )