line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package exact::cli; |
2
|
|
|
|
|
|
|
# ABSTRACT: Command-line interface helper utilities extension for exact |
3
|
|
|
|
|
|
|
|
4
|
1
|
|
|
1
|
|
282283
|
use 5.014; |
|
1
|
|
|
|
|
13
|
|
5
|
1
|
|
|
1
|
|
5
|
use exact; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
12
|
|
6
|
1
|
|
|
1
|
|
1239
|
use Util::CommandLine 1.04 (); |
|
1
|
|
|
|
|
56041
|
|
|
1
|
|
|
|
|
118
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
our $VERSION = '1.07'; # VERSION |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
sub import { |
11
|
1
|
|
|
1
|
|
29
|
my ( $self, $params, $caller ) = @_; |
12
|
1
|
|
33
|
|
|
5
|
$caller //= caller(); |
13
|
|
|
|
|
|
|
|
14
|
1
|
|
|
|
|
3
|
my @methods = qw( options pod2usage readmode singleton ); |
15
|
|
|
|
|
|
|
{ |
16
|
1
|
|
|
1
|
|
9
|
no strict 'refs'; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
312
|
|
|
1
|
|
|
|
|
2
|
|
17
|
|
|
|
|
|
|
|
18
|
1
|
|
|
|
|
2
|
for (@methods) { |
19
|
4
|
|
|
|
|
8
|
my $method = "Util::CommandLine::$_"; |
20
|
4
|
50
|
|
|
|
5
|
*{ $caller . '::' . $_ } = \&$method unless ( defined &{ $caller . '::' . $_ } ); |
|
4
|
|
|
|
|
15
|
|
|
4
|
|
|
|
|
25
|
|
21
|
|
|
|
|
|
|
} |
22
|
|
|
|
|
|
|
|
23
|
1
|
|
|
|
|
2
|
for ('podhelp') { |
24
|
1
|
50
|
|
|
|
1
|
*{ $caller . '::' . $_ } = \&$_ unless ( defined &{ $caller . '::' . $_ } ); |
|
1
|
|
|
|
|
7
|
|
|
1
|
|
|
|
|
11
|
|
25
|
|
|
|
|
|
|
} |
26
|
|
|
|
|
|
|
} |
27
|
|
|
|
|
|
|
} |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
sub podhelp { |
30
|
0
|
|
|
0
|
1
|
|
Util::CommandLine::options(); |
31
|
|
|
|
|
|
|
} |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
1; |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
__END__ |