File Coverage

blib/lib/exact/cli.pm
Criterion Covered Total %
statement 24 25 96.0
branch 2 4 50.0
condition 1 3 33.3
subroutine 5 6 83.3
pod 1 1 100.0
total 33 39 84.6


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