Branch Coverage

blib/lib/Params/Sah.pm
Criterion Covered Total %
branch 44 62 70.9


line true false branch
37 14 5 if (ref $_[0] eq 'HASH') { }
44 0 19 unless $opt_backend =~ /\A(Data::Sah::Tiny|Data::Sah)\z/
48 1 18 unless $opt_on_invalid =~ /\A(croak|carp|warn|die|return)\z/
52 0 18 if $opt_backend eq 'Data::Sah::Tiny' and $opt_invalid_detail
58 1 17 if keys %$opts
61 2 15 if ($opt_disable)
62 0 2 $opt_on_invalid eq 'str' ? :
70 7 8 if ($opt_named) { }
74 0 14 unless /\A[A-Za-z_][A-Za-z0-9_]*\z/
91 52 8 if ($opt_on_invalid =~ /\A(croak|carp|warn|die)\z/) { }
92 52 0 $opt_on_invalid =~ /\A(croak|carp)\z/ ? :
94 0 52 $opt_invalid_detail ? :
97 0 8 if ($opt_invalid_detail) { }
114 0 15 if $opt_invalid_detail
116 11 4 unless ($opt_allow_extra)
118 5 6 if ($opt_named) { }
131 22 5 unless (grep {$argname eq $_;} @$opt_optional_params)
133 11 11 if ($opt_named) { }
142 14 13 if ($opt_named) { }
150 26 1 if ($opt_backend eq 'Data::Sah') { }
155 0 26 $opt_invalid_detail ? :
166 0 27 unless $cd->{'v'} == 2
168 27 45 unless $mod_rec->{'phase'} eq 'runtime'
169 18 27 if grep {$_->{'name'} eq $mod_rec->{'name'} unless $mod_rec->{'use_statement'} and $_->{'use_statement'} and $_->{'use_statement'} eq $mod_rec->{'use_statement'};} @modules_for_all_args
170 37 12 unless $mod_rec->{'use_statement'} and $_->{'use_statement'} and $_->{'use_statement'} eq $mod_rec->{'use_statement'}
175 0 0 if $mentioned_vars{$var}++
177 0 0 defined $val ? :
180 0 27 if $i and $opt_on_invalid =~ /\A(carp|warn)\z/
186 0 15 if ($opt_invalid_detail) { }
193 0 15 if ($DEBUG)
199 0 15 if $@