lib/BalanceOfPower/Commands/NoArgs.pm

filter: Statementstmt 65.2% 15 / 23 Branchbran 30.0% 3 / 10 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 2 / 2 Podpod 0.0% 0 / 1 totaltotal 55.5% 20 / 36 CC 7 SCAR 26.1
CC
7
Cov
55%
extract_argument
15.4
BEGIN
1.0
CRAP 13.6
« lib/BalanceOfPower/Role/Reporter.pm ↑ Summary blib/lib/BalanceOfPower/Relations/RelPack.pm »
1 package BalanceOfPower::Commands::NoArgs;
2 11 $BalanceOfPower::Commands::NoArgs::VERSION = '0.200000';
3 11 ▶use Moo;
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
5 11 extends 'BalanceOfPower::Commands::Plain';
6  
7 sub extract_argument
8 {
9 1 ▶ my $self = shift;
Subroutine extract_argument: called CC=7 SCAR=27.3
Pod undocumented
10 1 my $query = shift;
11 1 my $extract = shift;
12 1 $query = uc $query;
13 1 ▶ $extract = 1 if(! defined $extract);
Branch: 1 branch
BranchTrueFalseTotal
unless defined $extract 0 1 1
14 1 my $name = $self->name;
15 1 ▶ if($query =~ /^$name$/)
Branch: 1 branch
BranchTrueFalseTotal
if ($query =~ /^$name$/) 1 0 1
16 {
17 1 ▶ if($extract)
Branch: 1 branch
BranchTrueFalseTotal
if ($extract) { } 0 1 1
18 {
19 0 return $2;
20 }
21 else
22 {
23 1 return 1;
24 }
25 }
26 0 foreach my $syn (@{$self->synonyms})
27 {
28 0 ▶ if($query =~ /^$syn$/)
Branch: 1 branch
BranchTrueFalseTotal
if ($query =~ /^$syn$/) 0 0 0
29 {
30 0 ▶ if($extract)
Branch: 1 branch
BranchTrueFalseTotal
if ($extract) { } 0 0 0
31 {
32 0 return $2;
33 }
34 else
35 {
36 0 return 1;
37 }
38 }
39 }
40 0 return undef;
41 }
42 11 1;
« lib/BalanceOfPower/Role/Reporter.pm ↑ Summary blib/lib/BalanceOfPower/Relations/RelPack.pm »