Branch Coverage

lib/Data/Processor/Validator.pm
Criterion Covered Total %
branch 67 80 83.7


line true false branch
43 1 187 unless $self->{'data'}
57 117 0 unless $self->{'schema_keys'}{$a} and $self->{'schema'}{$self->{'schema_keys'}{$a}}{'order'}
59 0 0 unless $self->{'schema_keys'}{$b} and $self->{'schema'}{$self->{'schema_keys'}{$b}}{'order'}
67 9 271 unless my $schema_key = $self->{'schema_keys'}{$key}
75 0 271 if ($self->{'schema'}{$schema_key}{'no_descend_into'})
81 7 264 unless (%{$self->{'schema'}{$schema_key};})
85 167 97 unless ($self->{'schema'}{$schema_key}{'members'})
95 92 5 if (ref $self->{'data'}{$key} eq ref {}) { }
2 3 elsif (ref $self->{'data'}{$key} eq ref [] and $self->{'schema'}{$schema_key}{'array'}) { }
115 1 0 if not defined $member and $self->{'schema'}{$schema_key}{'allow_empty'}
132 3 0 if ($self->{'schema'}{$schema_key}{'members'}) { }
168 15 3935 if $self->{'verbose'}
180 1322 1 unless $self->{'schema'}{$key}{'default'}
182 1 0 unless $self->{'data'}{$key}
186 9 271 unless my $schema_key = $self->{'schema_keys'}{$key}
190 1 270 if $e
202 1242 81 if ($self->{'schema'}{$key}{'optional'} and $self->{'schema'}{$key}{'optional'}) { }
206 61 20 if defined $self->{'data'}{$key}
209 10 10 if ($self->{'schema'}{$key}{'regex'})
215 11 8 if $c_key =~ /$key/
218 9 1 if $c > 0
224 4 7 if $self->{'schema'}{$key}{'error_msg'}
227 4 7 if ($error_msg)
247 180 99 if ($self->{'schema'}{$key}) { }
259 44 97 unless exists $self->{'schema'}{$match_key} and $self->{'schema'}{$match_key}{'regex'}
261 91 6 if ($key =~ /$match_key/)
270 8 271 unless ($schema_key)
284 134 137 unless $self->{'schema'}{$schema_key}{'validator'}
287 3 134 if (ref $self->{'data'}{$key} eq ref [] and $self->{'schema'}{$schema_key}{'array'}) { }
293 0 0 if not defined $elem and $self->{'schema'}{$schema_key}{'allow_empty'}
296 3 4 if ($return_value) { }
309 6 128 if (defined &blessed($validator)) { }
315 11 123 if ($return_value) { }
331 14 166 if (exists $self->{'schema'}{$key} and $self->{'schema'}{$key}{'value'})
337 0 14 if (ref $self->{'schema'}{$key}{'value'} eq 'CODE') { }
14 0 elsif (ref $self->{'schema'}{$key}{'value'} eq 'Regexp') { }
341 1 13 if (ref $self->{'data'}{$key} eq ref [] and $self->{'schema'}{$key}{'array'}) { }
346 0 0 if not defined $elem and $self->{'schema'}{$key}{'allow_empty'}
350 4 1 if ($elem =~ /^$self->{'schema'}{$key}{'value'}$/) { }
364 12 1 if ($self->{'data'}{$key} =~ /^$self->{'schema'}{$key}{'value'}$/) { }