Branch Coverage

blib/lib/Params/Check/Faster.pm
Criterion Covered Total %
branch 66 82 80.4


line true false branch
21 0 1 $^W ? :
263 0 38 unless ($_[0] and $_[1])
297 40 1 if (not $Params::Check::Faster::PRESERVE_CASE or $Params::Check::Faster::STRIP_LEADING_DASHES)
299 40 0 unless $Params::Check::Faster::PRESERVE_CASE
300 1 39 if $Params::Check::Faster::STRIP_LEADING_DASHES
301 3 37 if ($arg_key ne $orig_arg_key)
307 3 38 unless (exists $template{$arg_key})
308 2 1 unless ($Params::Check::Faster::ALLOW_UNKNOWN)
321 38 0 if ($Params::Check::Faster::SANITY_CHECK_TEMPLATE)
329 1 37 if ($arg_template{'no_override'})
342 4 33 if ($arg_template{'defined'} || $Params::Check::Faster::ONLY_ALLOW_DEFINED and not defined $arg_value)
352 2 31 if ($arg_template{'strict_type'} || $Params::Check::Faster::STRICT_TYPE and ref $arg_value ne ref $arg_template{'default'})
364 5 26 if (exists $arg_template{'allow'} and not do { local $Params::Check::Faster::_ERROR_STRING; allow($arg_value, $arg_template{'allow'}) })
380 6 20 if (my $ref = $arg_template{'store'})
381 0 6 unless (_store_var($arg_key, $ref, $arg_value, $verbose, \@to_store, \@to_delete))
395 14 24 if (@keys_to_remove)
403 3 17 if ($t_value->{'required'})
412 9 8 if (exists $t_value->{'default'})
415 0 9 if (my $ref = $t_value->{'store'})
416 0 0 unless (_store_var($t_key, $ref, $t_value->{'default'}, $verbose, \@to_store, \@to_delete))
423 1 16 if ($Params::Check::Faster::SANITY_CHECK_TEMPLATE and exists $t_value->{'store'} and not ref $t_value->{'store'})
433 1 16 if ($wrong || $warned and $Params::Check::Faster::WARNINGS_FATAL)
439 13 24 if $wrong
446 4 2 if ($type == 0) { }
1 1 elsif ($type == 1) { }
1 0 elsif ($type == 2) { }
456 1 23 if $Params::Check::Faster::NO_DUPLICATES
465 0 6 if ($Params::Check::Faster::SANITY_CHECK_TEMPLATE and not ref $ref)
472 1 5 if (ref $ref eq 'ARRAY') { }
1 4 elsif (ref $ref eq 'HASH') { }
473 0 1 if (ref $value ne 'ARRAY')
481 0 1 if $Params::Check::Faster::NO_DUPLICATES
484 0 1 if (ref $value ne 'HASH')
492 0 1 if $Params::Check::Faster::NO_DUPLICATES
497 1 3 if $Params::Check::Faster::NO_DUPLICATES
548 4 36 if (ref $_[1] eq 'Regexp')
554 18 18 if (ref $_[1] eq 'CODE')
559 7 11 if (ref $_[1] eq 'ARRAY')
565 5 7 if (allow($_[0], $_))
573 11 0 defined $_[0] && defined $_[1] ? :
609 0 18 if $verbose