Yath/Option/Auto.pm

filter: Statementstmt 83.3% 20 / 24 Branchbran 0.0% 0 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 90.9% 10 / 11 Podpod 0.0% 0 / 7 totaltotal 65.2% 30 / 46 CC 3 SCAR 12.6
CC
3
Cov
71%
get_env_value
12.0
BEGIN
1.0
BEGIN
1.0
CRAP 3.5
« Yath/Option/List.pm ↑ Summary Yath/Option/PathList.pm »
1 package Getopt::Yath::Option::Auto;
2 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
5 1 our $VERSION = '2.000007';
6  
7 1 ▶use parent 'Getopt::Yath::Option::Scalar';
Subroutine BEGIN: called CC=1 SCAR=0.0
8 1 ▶use Getopt::Yath::HashBase;
Subroutine BEGIN: called CC=1 SCAR=0.0
9  
10 1 ▶sub allows_default { 1 }
Subroutine allows_default: called CC=1 SCAR=0.0
Pod undocumented
11 13 ▶sub allows_arg { 1 }
Subroutine allows_arg: called CC=1 SCAR=0.0
Pod undocumented
12 10 ▶sub requires_arg { 0 }
Subroutine requires_arg: called CC=1 SCAR=0.0
Pod undocumented
13 4 ▶sub allows_autofill { 1 }
Subroutine allows_autofill: called CC=1 SCAR=0.0
Pod undocumented
14 3 ▶sub requires_autofill { 1 }
Subroutine requires_autofill: called CC=1 SCAR=0.0
Pod undocumented
15  
16 64 ▶sub can_set_env { 1 }
Subroutine can_set_env: called CC=1 SCAR=0.0
Pod undocumented
17  
18 sub get_env_value {
19 0 ▶ my $opt = shift;
Subroutine get_env_value: not called CC=3 SCAR=24.8
Pod undocumented
20 0 my ($var, $ref) = @_;
21  
22 0 ▶ return $$ref unless $var =~ m/^!/;
Branch: 1 branch
BranchTrueFalseTotal
unless $var =~ /^!/ 0 0 0
23 0 ▶ return $ref ? 0 : 1;
Branch: 1 branch
BranchTrueFalseTotal
$ref ? : 0 0 0
24 }
25  
26  
27 1 1;
28  
29 __END__
« Yath/Option/List.pm ↑ Summary Yath/Option/PathList.pm »