Branch Coverage

blib/lib/Log/Scrubber.pm
Criterion Covered Total %
branch 80 100 80.0


line true false branch
57 1 9 if (not defined $val) { }
1 8 elsif (ref $val eq 'HASH') { }
4 4 elsif ($val) { }
62 1 0 if $$_SDATA{'enabled'}
74 6 0 unless (defined $old_sdata)
85 1 11 if ($_[$i] eq ':Carp') { }
1 10 elsif ($_[$i] eq ':Syslog') { }
0 10 elsif ($_[$i] =~ /^\+/) { }
1 9 elsif ($_[$i] =~ /^(dis|en)able$/) { }
96 1 0 $1 eq 'dis' ? :
98 0 1 if defined $change and $change != $val
107 8 1 if (not defined $change or $change) { }
118 6 5 $$_SDATA{'enabled'} ? :
146 10 88 if (ref $sub_msg eq 'ARRAY') { }
20 68 elsif (ref $sub_msg eq 'HASH') { }
9 59 elsif (ref $sub_msg) { }
148 5 30 if (ref $v) { }
150 5 17 if ("$v" eq $_)
151 0 5 unless $found
159 30 20 if (ref $$sub_msg{$k}) { }
161 5 49 if ("$$sub_msg{$k}" eq $_)
162 25 5 unless $found
175 25 84 unless defined $$sub_msg
177 1 244 ref $$_SDATA{'scrub_data'}{$_} eq 'CODE' ? :
186 0 300 ref $$_SDATA{'scrub_data'}{$_} eq 'CODE' ? :
198 43 8 if ($#$copy == 0)
207 0 0 if (defined $x)
209 0 0 if $$_SDATA{'scrub_data'}{$_} = $$x{$_}
216 9 0 if (defined $x)
218 0 18 if not defined $_ or $_ eq ''
229 17 6 if (defined $$_SDATA{'SIG'}{$_}{'scrubber'} and defined $SIG{$_} and $SIG{$_} eq $$_SDATA{'SIG'}{$_}{'scrubber'}) { }
0 6 elsif (defined $$_SDATA{'SIG'}{$_}{'old'}) { }
247 18 19 unless $$_SDATA{'enabled'}
250 2 4 if defined $SIG{$sig_name} and defined $$_SDATA{'SIG'}{$sig_name}{'scrubber'} and $SIG{$sig_name} eq $$_SDATA{'SIG'}{$sig_name}{'scrubber'}
254 18 15 if ($sig_name eq '__WARN__')
257 4 13 defined $$_SDATA{'SIG'}{$sig_name}{'old'} && $$_SDATA{'SIG'}{$sig_name}{'old'} ne '' ? :
260 15 18 if ($sig_name eq '__DIE__')
263 0 17 defined $$_SDATA{'SIG'}{$sig_name}{'old'} && $$_SDATA{'SIG'}{$sig_name}{'old'} ne '' ? :
274 11 10 if ($_ eq 'WARN')
275 1 20 if ($_ eq '__WARN__')
276 9 12 if ($_ eq 'DIE')
277 0 21 if ($_ eq '__DIE__')
279 2 19 if defined $$_SDATA{'SIG'}{$sig_name}
292 23 6 if (defined $$_SDATA{'METHOD'}{$fullname}{'scrubber'} and defined $current_method and $current_method eq $$_SDATA{'METHOD'}{$fullname}{'scrubber'}) { }
0 6 elsif (defined $$_SDATA{'METHOD'}{$fullname}{'old'}) { }
310 23 20 unless $$_SDATA{'enabled'}
315 17 29 if ($fullname eq 'warnings::warnif')
317 0 46 unless (defined $r_orig)
326 0 25 if defined $$_SDATA{'METHOD'}{$fullname}
361 5 0 if (defined $x)