Branch Coverage

blib/lib/Audit/DBI/Utils.pm
Criterion Covered Total %
branch 56 78 71.7


line true false branch
64 0 3 if scalar keys %args != 0
74 2 7 if (Data::Validate::Type::is_arrayref($data_structure)) { }
1 6 elsif (Data::Validate::Type::is_hashref($data_structure)) { }
87 0 0 unless Data::Validate::Type::is_instance($data_structure, 'class', $class)
89 0 0 unless $data_structure->can($stringification_method)
122 0 5 unless defined $integer and $integer =~ /^\d+$/
141 6 28 unless defined $ip_address
143 23 5 if (my(@bytes) = $ip_address =~ /^(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})$/x)
145 23 0 unless (grep {$_ > 255;} @bytes)
220 6 3 if &Scalar::Util::looks_like_number($variable_1) and &Scalar::Util::looks_like_number($variable_2)
233 28 17 unless (Data::Validate::Type::is_coderef($comparison_function))
235 14 14 if (defined $comparison_function and $comparison_function eq 'eq') { }
246 9 36 unless (defined $structure1 and defined $structure2)
248 3 6 if (not defined $structure1 || defined $structure2) { }
265 0 36 if exists $$cache{"$structure1"}{"$structure2"}
269 3 33 if (Data::Validate::Type::is_hashref($structure1) and Data::Validate::Type::is_hashref($structure2))
282 3 3 if defined $diff
286 3 0 scalar keys %tmp != 0 ? :
292 0 33 if (ref $structure1 ne ref $structure2)
302 29 4 if (ref $structure1 eq '')
304 15 14 &$comparison_function($structure1, $structure2) ? :
313 4 0 if (Data::Validate::Type::is_arrayref($structure1))
325 7 4 unless defined $diff
334 4 0 scalar @tmp != 0 ? :
381 0 6 if $args{'absolute'} and not Class::Load::try_load_class('String::Diff')
394 1 8 unless defined $diff_structure
400 0 8 if exists $$cache{"$diff_structure"}
405 5 3 if (Data::Validate::Type::is_hashref($diff_structure))
408 4 1 if (exists $diff_structure->{'new'} and exists $diff_structure->{'old'}) { }
412 0 4 if ($args{'absolute'}) { }
419 0 0 unless Data::Validate::Type::is_string($diff_structure->{'new'}) and Data::Validate::Type::is_string($diff_structure->{'old'})
431 0 0 if ($line->[0] eq '+') { }
0 0 elsif ($line->[0] eq '-') { }
462 2 1 if (Data::Validate::Type::is_arrayref($diff_structure))
513 1 32 unless defined $structure
520 26 6 if (Data::Validate::Type::is_string($structure))
528 0 6 if defined $$cache{"$structure"}
532 3 3 if (Data::Validate::Type::is_hashref($structure))
543 2 1 if (Data::Validate::Type::is_arrayref($structure))