Condition Coverage

lib/Mojolicious/Plugin/Vparam.pm
Criterion Covered Total %
condition 109 149 73.1


and 3 conditions

line !l l&&!r l&&r condition
129 0 0 3 defined $conf->{'class'} and length $conf->{'class'}
318 501 7 14 @input > 1 and not $attr{'hash'}
340 510 4 8 $attr{'hash'} and $attr{'hash'} eq '1'
384 6 4 7 defined $in and $in =~ /^\s*$/
400 13 489 59 $type and not defined $in
433 0 1 0 defined $in and $in =~ /^\s*$/
450 529 0 24 $attr{'hash'} and defined $key
456 480 10 32 $attr{'array'} and not $attr{'optional'}
490 28 4 $attr{'array'} and not $attr{'optional'} and not @input
459 510 0 12 $attr{'hash'} and not $attr{'optional'}
510 11 1 $attr{'hash'} and not $attr{'optional'} and not @input
477 462 0 6 $attr{'skipundef'} and not defined $output[0]

or 2 conditions

line l !l condition
26 74 0 $conf ||= {}
28 0 74 $conf->{'class'} ||= 'field-with-error'
29 0 74 $conf->{'types'} ||= {}
30 0 74 $conf->{'filters'} ||= {}
32 0 74 $conf->{'vsort_page'} ||= 'page'
33 0 74 $conf->{'vsort_rws'} ||= 'rws'
34 0 74 $conf->{'rows'} ||= 25
35 0 74 $conf->{'vsort_oby'} ||= 'oby'
36 0 74 $conf->{'vsort_ods'} ||= 'ods'
37 0 74 $conf->{'ods'} ||= 'ASC'
39 1 73 $conf->{'phone_country'} //= ''
40 1 73 $conf->{'phone_region'} //= ''
41 1 73 $conf->{'phone_fix'} //= ''
47 0 74 $conf->{'blessed'} //= 1
48 0 74 $conf->{'optional'} //= 0
49 0 74 $conf->{'skipundef'} //= 0
50 0 74 $conf->{'multiline'} //= 0
52 3 71 $conf->{'address_secret'} //= ''
54 0 74 $conf->{'password_min'} //= 8
56 0 74 $conf->{'hash_delimiter'} //= '=>'
87 449 88 $self->stash->{'vparam-verrors'} //= {}
94 121 0 $errors->{$name}{'message'} // 0
103 3 2 $error->{'message'} // 0
155 15 5 $self->stash->{'vparam-verrors'} //= {}
185 345 115 $self->stash->{'vparam-vars'} //= {}
275 8 0 $self->req->body // ''
288 4 0 $self->req->body // ''
296 5 0 $self->req->body // ''

or 3 conditions

line l !l&&r !l&&!r condition
60 0 74 0 $conf->{'mojo_validator'} //= 'version'->new($Mojolicious::VERSION) < 'version'->new(4.42) ? 0 : 1
217 16 4 508 $attr{'optional'} //= $optional
218 6 0 522 $attr{'skipundef'} //= $skipundef
219 9 0 519 $attr{'multiline'} //= $multiline
220 4 524 0 $attr{'blessed'} //= $blessed
223 514 1 13 $attr{'type'} // $attr{'isa'}
230 15 2 33 $mod eq '?' or $mod =~ /^optional\[/i
3 3 27 $mod eq '!' or $mod =~ /^required?\[/i
20 2 5 $mod eq '@' or $mod =~ /^array\[/i
237 0 2 0 $attr{'hash'} //= $conf->{'hash_delimiter'}
275 11 7 1 $vars->{'json'} //= Mojolicious::Plugin::Vparam::JSON::parse_json($self->req->body // '')
280 11 7 0 $vars->{'pointer'} //= 'Mojo::JSON::Pointer'->new($vars->{'json'})
288 2 3 1 $vars->{'dom'} //= Mojolicious::Plugin::Vparam::DOM::parse_dom($self->req->body // '')
296 0 0 5 $vars->{'xml'} //= Mojolicious::Plugin::Vparam::XML::parse_xml($self->req->body // '')
315 456 6 60 @input or $attr{'array'}
6 1 59 @input or $attr{'array'} or $attr{'hash'}
448 392 161 8 defined $out or not $attr{'skipundef'}
462 5 517 0 $attr{'as'} // $name
511 0 424 0 $attr{'as'} // $name