| line |
true |
false |
branch |
|
27
|
6 |
23 |
unless $self->_yaml_config($filename) |
|
44
|
29 |
23 |
if @_ == 2 |
|
53
|
1 |
2 |
if ($value) |
|
63
|
1 |
1 |
if ($value) |
|
74
|
3 |
32 |
if (@_ and @_ % 2 == 0) { } |
|
90
|
36 |
75 |
if exists $optional->{$name} |
|
91
|
75 |
36 |
if exists $required->{$name} |
|
93
|
5 |
106 |
if $fields{$name}{'no_validate'} |
|
98
|
26 |
80 |
if ($depends_on) |
|
99
|
3 |
23 |
if (not exists $hash{$depends_on} || $fields{$name}{'depends_lax'}) { } |
|
|
22 |
1 |
elsif (defined $hash{$depends_on}) { } |
|
108
|
10 |
12 |
if $cases->{$depends_on_value} |
|
114
|
25 |
78 |
unless ($success) |
|
128
|
1 |
40 |
if (@_ and @_ % 2 == 0) { } |
|
137
|
38 |
3 |
if (defined $step) { } |
|
138
|
3 |
35 |
unless $self->{'fieldnames'}{$step} |
|
146
|
2 |
39 |
if ($options{'exclude'}) |
|
171
|
24 |
6 |
if ($subhash->{'message'}) |
|
182
|
1 |
5 |
unless $values |
|
183
|
1 |
4 |
if ref $values ne 'ARRAY' |
|
187
|
1 |
1 |
$self->check($field, $value) ? : |
|
209
|
197 |
40 |
if ($definition and $definition->{'type'} eq 'required' or not $definition and exists $self->_required->{$field}) { } |
|
|
18 |
23 |
elsif ($definition && $definition->{'type'} eq 'optional' || !$definition && exists $self->_optional->{$field} and not defined $value && length $value) { } |
|
213
|
16 |
181 |
unless defined $value and length $value |
|
225
|
293 |
233 |
if (exists $dispatch{$key}) { } |
|
|
6 |
227 |
elsif ($key eq 'plugin') { } |
|
226
|
72 |
218 |
unless ($dispatch{$key}->($value, $subhash->{$key}, $self)) |
|
232
|
2 |
4 |
ref $subhash->{$key} ? : |
|
242
|
5 |
3 |
if (not $@ and $module->can('check')) { } |
|
244
|
1 |
4 |
unless $local_bool |
|
251
|
1 |
2 |
$one_not_ok ? : |
|
263
|
1 |
2 |
unless $info |
|
272
|
3 |
26 |
if (ref $file and 'SCALAR' eq ref $file) { } |
|
|
22 |
4 |
elsif (defined $file and -e $file) { } |
|
|
3 |
1 |
elsif (defined $file) { } |
|
276
|
1 |
2 |
unless (eval {
do {
$self->{'config'} = 'YAML::Tiny'->read_string(${$file;});
1
}
}) |
|
285
|
1 |
21 |
unless (eval {
do {
$self->{'config'} = 'YAML::Tiny'->read($file);
1
}
}) |
|
299
|
2 |
21 |
if ($self->_no_steps) { } |
|
316
|
48 |
65 |
if (exists $data->{$field}{'type'} and $data->{$field}{'type'} eq 'required') { } |
|
|
62 |
3 |
elsif (not exists $self->_required->{$field}) { } |
|
320
|
5 |
43 |
if (exists $self->_optional->{$field}) |
|
334
|
2 |
114 |
unless &looks_like_number($value) |
|
340
|
2 |
106 |
unless &looks_like_number($value) |
|
353
|
20 |
1 |
if ($check =~ /,/) { } |
|
356
|
6 |
14 |
if (defined $min and length $value < $min) |
|
359
|
1 |
19 |
if (defined $max and length $value > $max) |
|
378
|
2 |
2 |
unless $self->_allow_subs |
|
386
|
29 |
4 |
if @_ == 2 |
|
395
|
17 |
19 |
if ($type eq 'int') { } |
|
|
6 |
13 |
elsif ($type eq 'num') { } |
|
|
12 |
1 |
elsif ($type eq 'positive_int') { } |
|
396
|
2 |
15 |
unless &looks_like_number($value) |
|
397
|
2 |
13 |
unless $value =~ /\A [+-]? \d+ (?:[eE]\d+)? \z/msx |
|
401
|
2 |
4 |
unless &looks_like_number($value) |
|
405
|
3 |
9 |
unless &looks_like_number($value) |