File Coverage

blib/lib/App/DuckPAN/Cmd.pm
Criterion Covered Total %
statement 10 12 83.3
branch n/a
condition n/a
subroutine 2 3 66.6
pod 0 2 0.0
total 12 17 70.5


line stmt bran cond sub pod time code
1             package App::DuckPAN::Cmd;
2             our $AUTHORITY = 'cpan:DDG';
3             # ABSTRACT: Base class for commands of DuckPAN
4             $App::DuckPAN::Cmd::VERSION = '1017';
5 5     5   1922 use Moo::Role;
  5         7  
  5         25  
6              
7             requires 'run';
8              
9             has app => (
10             is => 'rw',
11             );
12              
13             sub initialize {
14 0     0 0 0 my $self = shift;
15 0         0 $self->app->initialize_working_directory();
16             }
17              
18             sub execute {
19 1     1 0 2436 my ( $self, $args, $chain ) = @_;
20 1         1 my $app = shift @{$chain};
  1         2  
21 1         10 $self->app($app);
22 1         19 $self->initialize();
23 1         1 $self->run(@{$args});
  1         7  
24             }
25              
26             1;
27              
28             __END__
29              
30             =pod
31              
32             =head1 NAME
33              
34             App::DuckPAN::Cmd - Base class for commands of DuckPAN
35              
36             =head1 VERSION
37              
38             version 1017
39              
40             =head1 AUTHOR
41              
42             DuckDuckGo <open@duckduckgo.com>, Zach Thompson <zach@duckduckgo.com>, Zaahir Moolla <moollaza@duckduckgo.com>, Torsten Raudssus <torsten@raudss.us> L<https://raudss.us/>
43              
44             =head1 COPYRIGHT AND LICENSE
45              
46             This software is Copyright (c) 2013 by DuckDuckGo, Inc. L<https://duckduckgo.com/>.
47              
48             This is free software, licensed under:
49              
50             The Apache License, Version 2.0, January 2004
51              
52             =cut