line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
2
|
|
|
2
|
|
1299
|
use 5.008; |
|
2
|
|
|
|
|
8
|
|
|
2
|
|
|
|
|
80
|
|
2
|
2
|
|
|
2
|
|
11
|
use warnings; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
48
|
|
3
|
2
|
|
|
2
|
|
10
|
use strict; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
233
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
package Class::Scaffold::App::CommandLine; |
6
|
|
|
|
|
|
|
BEGIN { |
7
|
2
|
|
|
2
|
|
43
|
$Class::Scaffold::App::CommandLine::VERSION = '1.102280'; |
8
|
|
|
|
|
|
|
} |
9
|
|
|
|
|
|
|
# ABSTRACT: Base class for command line-based framework applications |
10
|
2
|
|
|
2
|
|
1778
|
use Class::Scaffold::Environment; |
|
2
|
|
|
|
|
6
|
|
|
2
|
|
|
|
|
39
|
|
11
|
2
|
|
|
2
|
|
94
|
use Property::Lookup; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
19
|
|
12
|
2
|
|
|
2
|
|
78
|
use parent qw(Class::Scaffold::App Getopt::Inherited); |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
13
|
|
13
|
2
|
|
|
2
|
|
167254
|
use constant CONTEXT => 'generic/shell'; |
|
2
|
|
|
|
|
6
|
|
|
2
|
|
|
|
|
127
|
|
14
|
2
|
|
|
2
|
|
13
|
use constant GETOPT => (qw(dryrun conf=s environment)); |
|
2
|
|
|
|
|
6
|
|
|
2
|
|
|
|
|
355
|
|
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
sub app_init { |
17
|
2
|
|
|
2
|
1
|
25
|
my $self = shift; |
18
|
2
|
|
|
|
|
53
|
$self->do_getopt; |
19
|
|
|
|
|
|
|
# Add a hash configurator layer for getopt before the superclass has a |
20
|
|
|
|
|
|
|
# chance to add the file configurator; this way, getopt definitions take |
21
|
|
|
|
|
|
|
# precedence over what's in the conf file. |
22
|
2
|
|
|
|
|
4712
|
Property::Lookup->instance->add_layer(hash => scalar $self->opt); |
23
|
2
|
|
|
|
|
5367
|
$self->SUPER::app_init(@_); |
24
|
|
|
|
|
|
|
} |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
sub app_finish { |
27
|
2
|
|
|
2
|
1
|
8
|
my $self = shift; |
28
|
2
|
|
|
|
|
20
|
$self->delegate->disconnect; |
29
|
|
|
|
|
|
|
} |
30
|
|
|
|
|
|
|
1; |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
__END__ |