line |
true |
false |
branch |
78
|
0 |
365 |
unless (grep {$_ eq $$self{'type'};} 'flag', 'bool', 'int', 'float', 'string') |
82
|
67 |
298 |
if ($$self{'type'} eq 'flag') |
83
|
0 |
67 |
if ($$self{'storage'} ne 'scalar') |
89
|
0 |
365 |
if ($$self{'type'} eq 'bool' and $$self{'storage'} ne 'scalar') |
93
|
15 |
350 |
if ($$self{'storage'} eq 'array') { } |
|
15 |
335 |
elsif ($$self{'storage'} eq 'hash') { } |
101
|
0 |
365 |
if ($$self{'check'} and not $check_type eq 'CODE' || $check_type =~ /(^|::)Regexp$/ || $check_type eq 'ARRAY') |
108
|
22 |
343 |
if exists $opts{'value'} |
109
|
22 |
343 |
if exists $opts{'default'} |
185
|
91 |
21 |
if (@_ == 2) |
191
|
1 |
111 |
if (@_ == 1 and $self->requires_arg) |
195
|
0 |
111 |
if (@_ > 1 and not $self->uses_arg) |
199
|
14 |
97 |
if ($self->storage eq 'hash') |
201
|
7 |
7 |
if (defined $key) { } |
|
6 |
1 |
elsif ($value =~ /^(.*?)=(.*)$/) { } |
211
|
0 |
97 |
if (defined $key) |
215
|
9 |
88 |
if ($self->storage eq 'array') |
216
|
1 |
8 |
if (ref $value eq 'ARRAY') { } |
224
|
0 |
88 |
if (ref $value) |
228
|
10 |
78 |
if ($self->type eq 'flag') { } |
|
1 |
77 |
elsif ($self->type eq 'bool' and @_ == 1) { } |
|
2 |
75 |
elsif (@_ == 1 and exists $$self{'default'}) { } |
318
|
0 |
0 |
ref $$self{'check'} eq 'ARRAY' ? : |
345
|
94 |
16 |
if ($type eq 'string') { } |
|
9 |
7 |
elsif ($type eq 'int') { } |
|
4 |
3 |
elsif ($type eq 'float') { } |
|
3 |
0 |
elsif ($type eq 'bool') { } |
346
|
93 |
1 |
defined $value ? : |
354
|
1 |
2 |
if (defined $value and $value =~ /^(1|true|yes)$/i) { } |
|
2 |
0 |
elsif (defined $value and $value =~ /^(0|false|no)$/i) { } |
366
|
0 |
110 |
if ($@) |
369
|
0 |
110 |
if ($type eq 'flag') |
375
|
98 |
12 |
if (not $$self{'check'}) { } |
|
4 |
8 |
elsif (ref $$self{'check'} eq 'CODE') { } |
|
4 |
4 |
elsif (ref($$self{'check'}) =~ /(^|::)Regexp$/) { } |
|
4 |
0 |
elsif (ref $$self{'check'} eq 'ARRAY') { } |
382
|
2 |
2 |
if (do {
local $_ = $value;
$$self{'check'}($_)
}) { } |
391
|
2 |
2 |
if ($value =~ /$re/) { } |
397
|
0 |
4 |
if (not defined $value and grep {not defined $_;} @{$$self{'check'};}) |
400
|
2 |
2 |
if (defined $value and grep {$_ eq $value;} @{$$self{'check'};}) |
403
|
2 |
0 |
defined $value ? : |