Branch Coverage

blib/lib/Scalar/Validation.pm
Criterion Covered Total %
branch 81 98 82.6


line true false branch
503 6 18 if ($arg eq 1 or $arg eq 0) { }
507 0 6 if ($last_idx < 1)
513 6 6 $transform_key_ref ? :
525 3 0 if defined $_
526 3 0 if defined $_
1 1 $transform_key_ref ? :
544 1 213 unless ($rule_ref)
550 64 149 if (defined $$rule_ref{-'as'})
551 0 64 unless _check_parent_rules($$rule_ref{-'as'}, $_)
564 2 3 unless ($ref_type)
571 1 2 unless ($get_contents_ref)
585 21 3 defined $_ ? :
588 0 24 if $message_store
629 0 12 if ($container_type eq 'ARRAY') { }
12 0 elsif ($container_type eq 'HASH') { }
651 5 0 $trouble_level > $trouble_accepted ? :
657 36 2 if not $message_store && $mode or $mode ne '-clear'
670 0 7 unless (is_valid('mode', -'Enum', ['die', 'warn', 'silent', 'off'], $mode))
677 0 7 if ($mode eq 'die') { }
2 5 elsif ($mode eq 'warn') { }
3 2 elsif ($mode eq 'silent') { }
2 0 elsif ($mode eq 'off') { }
714 2 17 $$rule_store{$rule} ? :
719 1 15 if (rule_known($rule_name))
759 1 2 if '' eq shift()
777 3 0 if defined $_
789 3 0 if defined $_
828 1 2 if ($type eq 'String')
901 3 5 unless (defined $$validation_options_ref[-1])
902 3 0 if exists $$options_ref{-'default'}
905 6 2 if ($correction_action)
928 2 76 if (not is_valid('key', 'Scalar', $first_arg)) { }
941 27 51 unless (is_valid('option_ref', 'HashRef', $hash_ref))
948 43 35 unless (defined $value)
949 0 43 if ($option_args_ref)
962 6 776 if ($off)
964 5 1 if $$special_rules{$_[1]}
965 1 5 if $value_pos >= 0
971 0 781 unless ($rule_info)
979 219 562 unless ($rule_ref)
982 168 51 if $special_rule
986 2 49 if (not $ref_type) { }
34 15 elsif ($ref_type eq 'HASH') { }
15 0 elsif ($ref_type eq 'CODE') { }
1014 138 473 defined $$rule_ref{-'as'} ? :
1018 104 506 unless ($parent_is_valid and $$rule_ref{-'where'}())
1019 96 8 defined $_ ? :
1021 11 93 if $message_store
1024 61 2 if defined $result