| 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
| |||||||||||
| 19 | 0 | my $name = $self->name; | |||||||||
| 20 | 0 | ▶ | if($query =~ /^$name$/) | ||||||||
|
Branch: 1 branch
| |||||||||||
| 21 | { | ||||||||||
| 22 | 0 | ▶ | if($extract) | ||||||||
|
Branch: 1 branch
| |||||||||||
| 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
| |||||||||||
| 34 | { | ||||||||||
| 35 | 0 | ▶ | if($extract) | ||||||||
|
Branch: 1 branch
| |||||||||||
| 36 | { | ||||||||||
| 37 | 0 | return $2; | |||||||||
| 38 | } | ||||||||||
| 39 | else | ||||||||||
| 40 | { | ||||||||||
| 41 | 0 | return 1; | |||||||||
| 42 | } | ||||||||||
| 43 | } | ||||||||||
| 44 | } | ||||||||||
| 45 | 0 | return undef; | |||||||||
| 46 | } | ||||||||||
| 47 | 13 | 1; | |||||||||