Branch Coverage

lib/Data/Processor/Validator.pm
Criterion Covered Total %
branch 68 80 85.0


line true false branch
43 1 208 unless $self->{'data'}
57 125 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 10 299 unless my $schema_key = $self->{'schema_keys'}{$key}
75 0 299 if ($self->{'schema'}{$schema_key}{'no_descend_into'})
81 7 292 unless (%{$self->{'schema'}{$schema_key};})
85 186 106 unless ($self->{'schema'}{$schema_key}{'members'})
95 101 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 4299 if $self->{'verbose'}
180 1438 4 unless defined $self->{'schema'}{$key}{'default'}
182 2 2 unless defined $self->{'data'}{$key}
186 10 299 unless my $schema_key = $self->{'schema_keys'}{$key}
190 1 298 if $e
202 1354 88 if ($self->{'schema'}{$key}{'optional'} and $self->{'schema'}{$key}{'optional'}) { }
206 68 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 201 106 if ($self->{'schema'}{$key}) { }
259 44 104 unless exists $self->{'schema'}{$match_key} and $self->{'schema'}{$match_key}{'regex'}
261 98 6 if ($key =~ /$match_key/)
270 8 299 unless ($schema_key)
284 146 153 unless $self->{'schema'}{$schema_key}{'validator'}
287 3 150 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 144 if (defined &blessed($validator)) { }
315 12 138 if ($return_value) { }
331 14 187 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'}$/) { }