| 1 | package App::DuckPAN::Cmd; | ||
| 2 | 5 | our $AUTHORITY = 'cpan:DDG'; | |
| 3 | # ABSTRACT: Base class for commands of DuckPAN | ||
| 4 | 5 | $App::DuckPAN::Cmd::VERSION = '1021'; | |
| 5 | 5 | ▶ | use Moo::Role; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 6 | |||
| 7 | 5 | requires 'run'; | |
| 8 | |||
| 9 | 5 | has app => ( | |
| 10 | is => 'rw', | ||
| 11 | ); | ||
| 12 | |||
| 13 | 0 | ▶ | sub initialize { |
|
Subroutine
initialize: not called CC=1 SCAR=6.9
Pod
undocumented
| |||
| 14 | 0 | my $self = shift; | |
| 15 | 0 | $self->app->initialize_working_directory(); | |
| 16 | } | ||
| 17 | |||
| 18 | 1 | ▶ | sub execute { |
|
Subroutine
execute: called CC=1 SCAR=0.0
Pod
undocumented
| |||
| 19 | 1 | my ( $self, $args, $chain ) = @_; | |
| 20 | 1 | my $app = shift @{$chain}; | |
| 21 | 1 | $self->app($app); | |
| 22 | 1 | $self->initialize(); | |
| 23 | 1 | $self->run(@{$args}); | |
| 24 | } | ||
| 25 | |||
| 26 | 5 | 1; | |
| 27 | |||
| 28 | __END__ | ||