line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
1
|
|
|
1
|
|
127419
|
use strict; |
|
1
|
|
|
|
|
13
|
|
|
1
|
|
|
|
|
30
|
|
2
|
1
|
|
|
1
|
|
6
|
use warnings; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
60
|
|
3
|
|
|
|
|
|
|
|
4
|
|
|
|
|
|
|
package Code::Statistics::App; |
5
|
|
|
|
|
|
|
$Code::Statistics::App::VERSION = '1.190680'; |
6
|
|
|
|
|
|
|
# ABSTRACT: handles global command configuration and cstat instantiation |
7
|
|
|
|
|
|
|
|
8
|
1
|
|
|
1
|
|
434
|
use App::Cmd::Setup -app; |
|
1
|
|
|
|
|
29872
|
|
|
1
|
|
|
|
|
7
|
|
9
|
|
|
|
|
|
|
|
10
|
1
|
|
|
1
|
|
377
|
use Code::Statistics; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
138
|
|
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
sub global_opt_spec { |
13
|
6
|
|
|
6
|
1
|
14422
|
my @opts = ( |
14
|
|
|
|
|
|
|
[ 'global_conf_file|g=s' => 'path to the global config file' ], |
15
|
|
|
|
|
|
|
[ 'conf_file|c=s' => 'path to the local config file' ], |
16
|
|
|
|
|
|
|
[ 'profile|p=s' => 'a configuration profile' ], |
17
|
|
|
|
|
|
|
); |
18
|
6
|
|
|
|
|
34
|
return @opts; |
19
|
|
|
|
|
|
|
} |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
sub cstat { |
23
|
3
|
|
|
3
|
1
|
31
|
my ( $self, %command_args ) = @_; |
24
|
|
|
|
|
|
|
|
25
|
3
|
|
|
|
|
7
|
my %args = ( %{ $self->global_options }, command => ( $self->get_command( @ARGV ) )[0], ); |
|
3
|
|
|
|
|
10
|
|
26
|
|
|
|
|
|
|
|
27
|
3
|
|
|
|
|
3541
|
return Code::Statistics->new( %args, args => \%command_args ); |
28
|
|
|
|
|
|
|
} |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
1; |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
__END__ |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
=pod |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
=encoding UTF-8 |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
=head1 NAME |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
Code::Statistics::App - handles global command configuration and cstat instantiation |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
=head1 VERSION |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
version 1.190680 |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
=head2 cstat |
47
|
|
|
|
|
|
|
Creates a Code::Statistics object with the given commandline args. |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
=head1 AUTHOR |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
Christian Walde <mithaldu@yahoo.de> |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
Christian Walde has dedicated the work to the Commons by waiving all of his |
57
|
|
|
|
|
|
|
or her rights to the work worldwide under copyright law and all related or |
58
|
|
|
|
|
|
|
neighboring legal rights he or she had in the work, to the extent allowable by |
59
|
|
|
|
|
|
|
law. |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
Works under CC0 do not require attribution. When citing the work, you should |
62
|
|
|
|
|
|
|
not imply endorsement by the author. |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
=cut |