| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
5
|
|
|
5
|
|
1833
|
use strict; |
|
|
5
|
|
|
|
|
10
|
|
|
|
5
|
|
|
|
|
116
|
|
|
2
|
5
|
|
|
5
|
|
20
|
use warnings; |
|
|
5
|
|
|
|
|
7
|
|
|
|
5
|
|
|
|
|
209
|
|
|
3
|
|
|
|
|
|
|
|
|
4
|
|
|
|
|
|
|
package Footprintless::App::Action; |
|
5
|
|
|
|
|
|
|
$Footprintless::App::Action::VERSION = '1.28'; |
|
6
|
|
|
|
|
|
|
# ABSTRACT: A base class for actions |
|
7
|
|
|
|
|
|
|
# PODNAME: Footprintless::App::Action |
|
8
|
|
|
|
|
|
|
|
|
9
|
5
|
|
|
5
|
|
23
|
use parent qw(App::Cmd::ArgProcessor); |
|
|
5
|
|
|
|
|
9
|
|
|
|
5
|
|
|
|
|
68
|
|
|
10
|
|
|
|
|
|
|
|
|
11
|
5
|
|
|
5
|
|
314
|
use Footprintless::App -ignore; |
|
|
5
|
|
|
|
|
8
|
|
|
|
5
|
|
|
|
|
36
|
|
|
12
|
5
|
|
|
5
|
|
895
|
use Log::Any; |
|
|
5
|
|
|
|
|
8
|
|
|
|
5
|
|
|
|
|
20
|
|
|
13
|
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
my $logger = Log::Any->get_logger(); |
|
15
|
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
sub _new { |
|
17
|
8
|
|
|
8
|
|
29
|
my ( $class, $self ) = @_; |
|
18
|
8
|
|
|
|
|
51
|
return bless( $self, $class ); |
|
19
|
|
|
|
|
|
|
} |
|
20
|
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
sub abstract { |
|
22
|
0
|
|
|
0
|
1
|
0
|
my ($self_or_class) = @_; |
|
23
|
|
|
|
|
|
|
|
|
24
|
0
|
|
|
|
|
0
|
require Footprintless::App::DocumentationUtil; |
|
25
|
0
|
|
|
|
|
0
|
return Footprintless::App::DocumentationUtil::abstract($self_or_class); |
|
26
|
|
|
|
|
|
|
} |
|
27
|
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
sub description { |
|
29
|
0
|
|
|
0
|
1
|
0
|
my ($self_or_class) = @_; |
|
30
|
|
|
|
|
|
|
|
|
31
|
0
|
|
|
|
|
0
|
require Footprintless::App::DocumentationUtil; |
|
32
|
0
|
|
0
|
|
|
0
|
my $description = Footprintless::App::DocumentationUtil::description($self_or_class) |
|
33
|
|
|
|
|
|
|
|| ucfirst( $self_or_class->abstract() ); |
|
34
|
|
|
|
|
|
|
|
|
35
|
0
|
0
|
|
|
|
0
|
if ( scalar( $self_or_class->opt_spec() ) ) { |
|
36
|
0
|
|
|
|
|
0
|
$description .= "\n\nAvailable options:\n"; |
|
37
|
|
|
|
|
|
|
} |
|
38
|
|
|
|
|
|
|
|
|
39
|
0
|
|
|
|
|
0
|
return $description; |
|
40
|
|
|
|
|
|
|
} |
|
41
|
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
sub prepare { |
|
43
|
8
|
|
|
8
|
1
|
24
|
my ( $class, $app, $footprintless, $coordinate, @args ) = @_; |
|
44
|
|
|
|
|
|
|
|
|
45
|
8
|
|
|
|
|
33
|
my ( $opts, $remaining_args, %fields ) = |
|
46
|
|
|
|
|
|
|
$class->_process_args( \@args, $class->usage_desc(), $class->opt_spec() ); |
|
47
|
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
return ( |
|
49
|
8
|
|
|
|
|
3445
|
$class->_new( |
|
50
|
|
|
|
|
|
|
{ app => $app, |
|
51
|
|
|
|
|
|
|
footprintless => $footprintless, |
|
52
|
|
|
|
|
|
|
coordinate => $coordinate, |
|
53
|
|
|
|
|
|
|
%fields |
|
54
|
|
|
|
|
|
|
} |
|
55
|
|
|
|
|
|
|
), |
|
56
|
|
|
|
|
|
|
$opts, |
|
57
|
|
|
|
|
|
|
$remaining_args |
|
58
|
|
|
|
|
|
|
); |
|
59
|
|
|
|
|
|
|
} |
|
60
|
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
sub opt_spec { |
|
62
|
3
|
|
|
3
|
1
|
14
|
return (); |
|
63
|
|
|
|
|
|
|
} |
|
64
|
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
sub usage { |
|
66
|
0
|
|
|
0
|
1
|
|
return $_[0]->{usage}; |
|
67
|
|
|
|
|
|
|
} |
|
68
|
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
sub usage_error { |
|
70
|
0
|
|
|
0
|
1
|
|
my ( $self, $message, $coordinate ) = @_; |
|
71
|
0
|
|
|
|
|
|
require Footprintless::App::UsageException; |
|
72
|
0
|
|
|
|
|
|
die( Footprintless::App::UsageException->new( $message, $coordinate ) ); |
|
73
|
|
|
|
|
|
|
} |
|
74
|
|
|
|
|
|
|
|
|
75
|
|
|
|
0
|
1
|
|
sub validate_args { } |
|
76
|
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
1; |
|
78
|
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
__END__ |