File Coverage

blib/lib/exact/cli.pm
Criterion Covered Total %
statement 27 28 96.4
branch 2 4 50.0
condition 1 3 33.3
subroutine 6 7 85.7
pod 1 1 100.0
total 37 43 86.0


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   227391 use 5.014;
  1         12  
5 1     1   5 use exact;
  1         1  
  1         8  
6 1     1   721 use strict;
  1         2  
  1         21  
7 1     1   422 use Util::CommandLine 1.04 ();
  1         46435  
  1         91  
8              
9             our $VERSION = '1.05'; # VERSION
10              
11             sub import {
12 1     1   31 my ( $self, $caller ) = @_;
13 1   33     4 $caller //= caller();
14              
15 1         2 my @methods = qw( options pod2usage readmode singleton );
16             {
17 1     1   8 no strict 'refs';
  1         2  
  1         292  
  1         1  
18 1         2 for (@methods) {
19 4         8 my $method = "Util::CommandLine::$_";
20 4 50       4 *{ $caller . '::' . $_ } = \&$method unless ( defined &{ $caller . '::' . $_ } );
  4         12  
  4         18  
21             }
22              
23 1         2 for ('podhelp') {
24 1 50       1 *{ $caller . '::' . $_ } = \&$_ unless ( defined &{ $caller . '::' . $_ } );
  1         4  
  1         4  
25             }
26             }
27             }
28              
29             sub podhelp {
30 0     0 1   Util::CommandLine::options();
31             }
32              
33             1;
34              
35             __END__