lib/BalanceOfPower/Commands/NoArgs.pm

filter: Statementstmt 25.0% 6 / 24 Branchbran 0.0% 0 / 10 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 33.3% 1 / 3 Podpod 0.0% 0 / 2 totaltotal 17.9% 7 / 39 CC 7 SCAR 37.8
CC
7
Cov
18%
extract_argument
56.0
has_argument
2.0
BEGIN
1.0
CRAP 43.9
« lib/BalanceOfPower/Role/Reporter.pm ↑ Summary lib/BalanceOfPower/Role/Shopper.pm »
1 package BalanceOfPower::Commands::NoArgs;
2 13 $BalanceOfPower::Commands::NoArgs::VERSION = '0.400115';
3 13 ▶use Moo;
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
5 13 extends 'BalanceOfPower::Commands::Plain';
6  
7 sub has_argument
8 0 ▶{
Subroutine has_argument: not called CC=1 SCAR=6.9
Pod undocumented
9 0 return 0;
10 }
11  
12 sub extract_argument
13 0 ▶{
Subroutine extract_argument: not called CC=7 SCAR=40.3
Pod undocumented
14 0 my $self = shift;
15 0 my $query = shift;
16 0 my $extract = shift;
17 0 $query = uc $query;
18 0 ▶ $extract = 1 if(! defined $extract);
Branch: 1 branch
BranchTrueFalseTotal
unless defined $extract 0 0 0
19 0 my $name = $self->name;
20 0 ▶ if($query =~ /^$name$/)
Branch: 1 branch
BranchTrueFalseTotal
if ($query =~ /^$name$/) 0 0 0
21 {
22 0 ▶ if($extract)
Branch: 1 branch
BranchTrueFalseTotal
if ($extract) { } 0 0 0
23 {
24 0 return $2;
25 }
26 else
27 {
28 0 return 1;
29 }
30 }
31 0 foreach my $syn (@{$self->synonyms})
32 {
33 0 ▶ if($query =~ /^$syn$/)
Branch: 1 branch
BranchTrueFalseTotal
if ($query =~ /^$syn$/) 0 0 0
34 {
35 0 ▶ if($extract)
Branch: 1 branch
BranchTrueFalseTotal
if ($extract) { } 0 0 0
36 {
37 0 return $2;
38 }
39 else
40 {
41 0 return 1;
42 }
43 }
44 }
45 0 return undef;
46 }
47 13 1;
« lib/BalanceOfPower/Role/Reporter.pm ↑ Summary lib/BalanceOfPower/Role/Shopper.pm »