blib/lib/Getopt/Kingpin/Arg.pm

filter: Statementstmt 100% 25 / 25 Branchbran 100% 8 / 8 Conditioncond 100% 3 / 3 MC/DCmcdc 100% 2 / 2 Subroutinesub 100% 5 / 5 Podpod 100% 1 / 1 totaltotal 100% 44 / 44 SCAR 17.9
CC
6
Cov
100%
help_name
6.0
BEGIN
1.0
BEGIN
1.0
CRAP 6.0
« blib/lib/Getopt/Kingpin/Commands.pm ↑ Summary blib/lib/Getopt/Kingpin/Type/ExistingDir.pm »
1 package Getopt::Kingpin::Arg;
2 31 ▶use 5.008001;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 31 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 31 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 31 ▶use Getopt::Kingpin::Base -base;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 31 our $VERSION = "0.10";
8  
9 sub help_name {
10 103 ▶ my $self = shift;
Subroutine help_name: called CC=6 SCAR=17.9
Pod documented
11 103 my $mode = shift;
12  
13 103 ▶ if (not defined $mode) {
Branch: 1 branch
BranchTrueFalseTotal
unless (defined $mode) 79 24 103
14 79 $mode = 0;
15 }
16  
17 103 my $ret = '<' . $self->name . '>';
18 103 ▶ if ($mode and $self->is_cumulative) {
Branch: 1 branch
BranchTrueFalseTotal
if ($mode and $self->is_cumulative) 3 100 103
Condition100%3/3
$mode and $self->is_cumulative
!ll&&!rl&&r
79213
MC/DC100%2/2
$mode and $self->is_cumulative
$mode $self->is_cumulative
Truth table100%3/3
A and B
A= $modeB= $self->is_cumulative
ABresult
0X0
100
111
19 3 $ret = $ret . '...';
20 }
21 103 ▶ if ($self->is_hash) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->is_hash) 4 99 103
22 4 $ret =~ s/</<KEY=/;
23 }
24 103 ▶ if (not $self->_required) {
Branch: 1 branch
BranchTrueFalseTotal
unless ($self->_required) 22 81 103
25 22 $ret = '[' . $ret . ']';
26 }
27 103 return $ret;
28 }
29  
30 31 1;
31 __END__
« blib/lib/Getopt/Kingpin/Commands.pm ↑ Summary blib/lib/Getopt/Kingpin/Type/ExistingDir.pm »