Branch Coverage

lib/Mojolicious/Plugin/InputValidation.pm
Criterion Covered Total %
branch 43 56 76.7


line true false branch
6 31 31 if @_
9 0 18 if @_
14 3 3 if $self->nillable and not defined $value or $self->empty and defined $value and not ref $value and $value eq '' or defined $value and not $self->pattern or $self->pattern and $value =~ $self->pattern
28 4 2 if $self->nillable and not defined $value or $self->empty and defined $value and not ref $value and $value eq '' or $value =~ /^\w+$/
41 2 2 if $self->nillable and not defined $value or $self->empty and defined $value and not ref $value and $value eq '' or $value =~ /^-?\d+\.\d+$/
54 9 2 if $self->nillable and not defined $value or $self->empty and defined $value and not ref $value and $value eq '' or $value =~ /^-?\d+$/
70 1 4 if (ref $elem eq 'ARRAY') { }
83 0 4 if $self->nillable and not defined $value
85 0 4 unless (ref $value eq 'ARRAY')
92 0 4 if (defined $self->{'max'} and $elems > $self->{'max'})
98 0 4 if (defined $self->{'min'} and $elems < $self->{'min'})
104 3 1 if ($self->{'of'}) { }
1 0 elsif ($self->{'pattern'} and not $self->{'min'} and not $self->{'min'}) { }
108 2 5 if ($err)
118 0 1 if ($err)
140 36 0 if (ref $elem eq 'HASH') { }
153 0 36 if $self->nillable and not defined $value
155 0 36 unless (ref $value eq 'HASH')
167 1 35 if (@unexpected)
172 1 34 if (@missing)
180 17 23 if ($err)
194 0 3 if @_
195 3 0 unless $self->{'pattern'}
199 2 1 if $self->nillable and not defined $value or $self->empty and defined $value and not ref $value and $value eq '' or $value =~ $self->pattern
254 36 34 if (ref $pattern eq 'HASH') { }
1 33 elsif (ref $pattern eq 'ARRAY') { }
261 0 70 unless UNIVERSAL::isa($pattern, 'IV_ANY')
264 31 39 unless $pattern->accepts($input, $path // '')