Branch Coverage

blib/lib/Scalar/Validation.pm
Criterion Covered Total %
branch 88 138 63.7


line true false branch
62 0 0 unless $module_string or $module_string =~ /^[\w:]+$/
664 6 18 if ($arg eq 1 or $arg eq 0) { }
668 0 6 if ($last_idx < 1)
674 6 6 $transform_key_ref ? :
686 3 0 if defined $_
687 3 0 if defined $_
1 1 $transform_key_ref ? :
705 1 225 unless ($rule_ref)
711 64 161 if (defined $$rule_ref{-'as'})
712 0 64 unless _check_parent_rules($$rule_ref{-'as'}, $_)
725 2 3 unless ($ref_type)
732 1 2 unless ($get_contents_ref)
746 21 3 defined $_ ? :
749 0 24 if $message_store
854 0 12 if ($container_type eq 'ARRAY') { }
12 0 elsif ($container_type eq 'HASH') { }
889 0 0 if $@
891 0 0 unless $instance_creator
898 0 0 if $doc_class_name
0 0 if $@
916 0 0 if (scalar @$parameters) { }
989 0 0 unless ($rule_info)
999 0 0 if ($rule_ref) { }
1006 0 0 if ($rule_ref)
1008 0 0 if ($last_idx >= 0)
1010 0 0 if ($print_args) { }
1020 0 0 unless ($rule_ref)
1023 0 0 if (not $ref_type) { }
0 0 elsif ($ref_type eq 'HASH') { }
0 0 elsif ($ref_type eq 'CODE') { }
1070 5 0 $trouble_level > $trouble_accepted ? :
1076 37 2 if not $message_store && $mode or $mode ne '-clear'
1089 0 7 unless (_p_is_valid('mode', -'Enum', ['die', 'warn', 'silent', 'off'], $mode))
1096 0 7 if ($mode eq 'die') { }
2 5 elsif ($mode eq 'warn') { }
3 2 elsif ($mode eq 'silent') { }
2 0 elsif ($mode eq 'off') { }
1133 2 17 $$rule_store{$rule} ? :
1138 1 15 if (rule_known($rule_name))
1179 1 2 if '' eq shift()
1197 3 0 if defined $_
1209 3 0 if defined $_
1248 1 2 if ($type eq 'String')
1326 3 5 if $special_rule
1328 3 5 unless (defined $$validation_options_ref[$value_pos])
1331 3 0 if (defined $default and $value_pos >= 0)
1339 6 2 if ($correction_action)
1354 5 1 if ($correction_done) { }
1356 5 0 if ($value_pos >= 0)
1357 4 1 unless ($validation_options_copied)
1365 1 0 defined $result ? :
1387 2 88 if (not _p_is_valid('key', 'Scalar', $first_arg)) { }
1400 27 63 unless (_p_is_valid('option_ref', 'HashRef', $hash_ref))
1407 55 35 unless (defined $value)
1408 0 55 if ($option_args_ref)
1432 6 884 if ($off)
1435 5 1 if $special_rule
1436 6 0 if $value_pos >= 0
1442 0 884 unless ($rule_info)
1450 237 647 unless ($rule_ref)
1453 186 51 if $special_rule
1457 2 49 if (not $ref_type) { }
34 15 elsif ($ref_type eq 'HASH') { }
15 0 elsif ($ref_type eq 'CODE') { }
1485 149 547 defined $$rule_ref{-'as'} ? :
1489 105 590 unless ($parent_is_valid and $$rule_ref{-'where'}())
1490 97 8 defined $_ ? :
1492 11 94 if $message_store
1495 62 2 if defined $result