| 1 | package exact::cli; | ||||||||||||||||||||
| 2 | # ABSTRACT: Command-line interface helper utilities extension for exact | ||||||||||||||||||||
| 3 | |||||||||||||||||||||
| 4 | 2 | ▶ | use 5.014; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 5 | 2 | ▶ | use exact; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 6 | 2 | ▶ | use Util::CommandLine 1.04 (); | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 7 | |||||||||||||||||||||
| 8 | 2 | our $VERSION = '1.09'; # VERSION | |||||||||||||||||||
| 9 | |||||||||||||||||||||
| 10 | 1 | ▶ | sub import { | ||||||||||||||||||
|
Subroutine
import: called CC=6 SCAR=18.2
| |||||||||||||||||||||
| 11 | 1 | my ( $self, $params, $caller ) = @_; | |||||||||||||||||||
| 12 | 1 | ▶ | $caller //= caller(); | ||||||||||||||||||
|
Condition33%1/3
$caller //= caller()
MC/DC0%0/2
$caller //= caller()
$caller
caller()
Truth table33%1/3
A //= B
A= $callerB= caller()
| |||||||||||||||||||||
| 13 | |||||||||||||||||||||
| 14 | 1 | my @methods = qw( options pod2usage readmode singleton ); | |||||||||||||||||||
| 15 | { | ||||||||||||||||||||
| 16 | 2 | ▶ | no strict 'refs'; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 17 | |||||||||||||||||||||
| 18 | 1 | for (@methods) { | |||||||||||||||||||
| 19 | 4 | my $method = "Util::CommandLine::$_"; | |||||||||||||||||||
| 20 | 4 | ▶ | *{ $caller . '::' . $_ } = \&$method unless ( defined &{ $caller . '::' . $_ } ); | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 21 | } | ||||||||||||||||||||
| 22 | |||||||||||||||||||||
| 23 | 1 | for ('podhelp') { | |||||||||||||||||||
| 24 | 1 | ▶ | *{ $caller . '::' . $_ } = \&$_ unless ( defined &{ $caller . '::' . $_ } ); | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 25 | } | ||||||||||||||||||||
| 26 | } | ||||||||||||||||||||
| 27 | } | ||||||||||||||||||||
| 28 | |||||||||||||||||||||
| 29 | 0 | ▶ | sub podhelp { | ||||||||||||||||||
|
Subroutine
podhelp: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||||||||||
| 30 | 0 | Util::CommandLine::options(); | |||||||||||||||||||
| 31 | } | ||||||||||||||||||||
| 32 | |||||||||||||||||||||
| 33 | 2 | 1; | |||||||||||||||||||
| 34 | |||||||||||||||||||||
| 35 | __END__ | ||||||||||||||||||||