line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package BalanceOfPower::Commands::NoArgs; |
2
|
|
|
|
|
|
|
$BalanceOfPower::Commands::NoArgs::VERSION = '0.400105'; |
3
|
13
|
|
|
13
|
|
3891
|
use Moo; |
|
13
|
|
|
|
|
18
|
|
|
13
|
|
|
|
|
55
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
extends 'BalanceOfPower::Commands::Plain'; |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
sub has_argument |
8
|
|
|
|
|
|
|
{ |
9
|
0
|
|
|
0
|
0
|
|
return 0; |
10
|
|
|
|
|
|
|
} |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
sub extract_argument |
13
|
|
|
|
|
|
|
{ |
14
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
15
|
0
|
|
|
|
|
|
my $query = shift; |
16
|
0
|
|
|
|
|
|
my $extract = shift; |
17
|
0
|
|
|
|
|
|
$query = uc $query; |
18
|
0
|
0
|
|
|
|
|
$extract = 1 if(! defined $extract); |
19
|
0
|
|
|
|
|
|
my $name = $self->name; |
20
|
0
|
0
|
|
|
|
|
if($query =~ /^$name$/) |
21
|
|
|
|
|
|
|
{ |
22
|
0
|
0
|
|
|
|
|
if($extract) |
23
|
|
|
|
|
|
|
{ |
24
|
0
|
|
|
|
|
|
return $2; |
25
|
|
|
|
|
|
|
} |
26
|
|
|
|
|
|
|
else |
27
|
|
|
|
|
|
|
{ |
28
|
0
|
|
|
|
|
|
return 1; |
29
|
|
|
|
|
|
|
} |
30
|
|
|
|
|
|
|
} |
31
|
0
|
|
|
|
|
|
foreach my $syn (@{$self->synonyms}) |
|
0
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
{ |
33
|
0
|
0
|
|
|
|
|
if($query =~ /^$syn$/) |
34
|
|
|
|
|
|
|
{ |
35
|
0
|
0
|
|
|
|
|
if($extract) |
36
|
|
|
|
|
|
|
{ |
37
|
0
|
|
|
|
|
|
return $2; |
38
|
|
|
|
|
|
|
} |
39
|
|
|
|
|
|
|
else |
40
|
|
|
|
|
|
|
{ |
41
|
0
|
|
|
|
|
|
return 1; |
42
|
|
|
|
|
|
|
} |
43
|
|
|
|
|
|
|
} |
44
|
|
|
|
|
|
|
} |
45
|
0
|
|
|
|
|
|
return undef; |
46
|
|
|
|
|
|
|
} |
47
|
|
|
|
|
|
|
1; |