Branch Coverage

blib/lib/IPC/Lite.pm
Criterion Covered Total %
branch 154 234 65.8


line true false branch
42 15 7 if (($ch, $sym) = /^([\$\@\%])(.+)/) { }
45 0 15 if ($sym =~ /\W/)
47 0 0 if ($sym =~ /^\w+[[{].*[]}]$/) { }
0 0 elsif (warnings::enabled() and length $sym == 1 and not $sym =~ tr/A-Za-z//) { }
0 0 elsif ($^H &= strict::bits('vars')) { }
59 15 0 unless $sym =~ /::/
60 0 15 unless $callpack eq 'main'
65 1 0 $ch eq '%' ? :
5 1 $ch eq '@' ? :
9 6 $ch eq '$' ? :
70 0 15 if ($@)
76 1 6 if ($_ =~ /^(ttl|timeout)$/i)
78 0 1 if $opts{'ttl'} =~ s/\s*\b(\d+)(s|\s*seconds)\b\s*//
79 0 0 $opts{'ttl'} ? :
0 1 if $opts{'ttl'} =~ s/\s*\b(\d+)(d|\s*days)\b\s*//
82 6 0 if ($_ =~ /^path$/i)
86 0 0 if ($_ =~ /^key$/i)
96 4 7 if (not $imps)
97 3 1 if $opts{'path'}
98 0 4 if $opts{'ttl'}
99 0 4 if $opts{'key'}
160 9 14 unless ($db = $DBS{$tid}{$path})
163 9 0 if ($db) { }
208 19 1 unless (defined $$self{'ttl'})
209 19 0 unless $callpack
214 11 0 unless ($$self{'path'} or $$self{'key'})
215 0 11 unless $callpack
219 0 20 if ($$self{'key'})
225 11 9 unless ($$self{'path'})
226 0 11 unless $callpack
232 18 2 if ($$self{'sym'}) { }
2 0 elsif ($$self{'table'}) { }
233 0 18 if $DEBUG
234 1 17 if ($$self{'ttl'})
239 0 1 if ($up == 0)
245 0 2 if ($$self{'type'} eq '$')
249 0 2 if $DEBUG
264 0 1 if $DEBUG
265 1 0 if ($styp eq '$') { }
0 0 elsif ($styp eq '%') { }
0 0 elsif ($styp eq '@') { }
287 4 1 if ($$self{'sym'}) { }
1 0 elsif ($$self{'table'}) { }
301 5 1 if ($$self{'sym'}) { }
1 0 elsif ($$self{'table'}) { }
319 3 0 if ($$self{'sym'}) { }
325 0 3 if ($$self{'type'} eq '%') { }
0 3 elsif ($$self{'type'} eq '@') { }
338 4 0 if ($$self{'sym'}) { }
351 4 8 unless ($row)
357 0 8 if (wantarray) { }
368 5 1 if ($$self{'sym'}) { }
369 0 5 if ($$self{'type'} eq '%') { }
5 0 elsif ($$self{'type'} eq '@') { }
383 0 4 unless defined $offset
384 0 4 unless defined $length
401 2 2 if ($n <= $#new) { }
2 0 elsif ($length > 0) { }
404 2 2 if ($$self{'sym'}) { }
417 1 1 if ($$self{'sym'}) { }
426 1 1 if ($$self{'sym'}) { }
438 2 2 wantarray ? :
450 0 0 if ($$self{'type'} eq '%') { }
451 0 0 if ($$self{'sym'}) { }
465 19 14 if ($$self{'sym'}) { }
471 29 4 defined $ind ? :
478 6 0 if ($count >= 0)
479 5 1 if ($$self{'sym'}) { }
493 1 1 if ($$self{'sym'}) { }
508 5 1 if ($$self{'sym'}) { }
540 23 36 if ($$self{'type'} eq '$') { }
10 26 elsif ($$self{'type'} eq '%') { }
26 0 elsif ($$self{'type'} eq '@') { }
543 8 2 if ($$self{'sym'}) { }
550 15 11 if ($$self{'sym'}) { }
562 1 58 if (defined $act and $act eq 'EXISTS')
573 8 50 unless defined $vtyp
575 45 5 if ($vtyp eq '$')
579 5 0 if ($vtyp eq '*')
580 5 0 unless defined $key
581 4 1 if ($$self{'ref'}{$key}) { }
587 0 1 if ($val eq '$') { }
1 0 elsif ($val eq '%') { }
0 0 elsif ($val eq '@') { }
604 0 1 unless ref $val
617 8 17 if ($$self{'type'} eq '$') { }
625 2 23 if (ref $val) { }
626 2 0 unless defined $key
631 0 2 if (ref $val eq 'SCALAR') { }
2 0 elsif (ref $val eq 'HASH') { }
0 0 elsif (ref $val eq 'ARRAY') { }
634 0 0 if defined $sav
639 0 2 if %sav
644 0 0 if @sav
654 0 25 if ($DEBUG)
659 1 24 if ($$self{'ttl'})
665 8 17 if ($$self{'type'} eq '$') { }
7 10 elsif ($$self{'type'} eq '%') { }
10 0 elsif ($$self{'type'} eq '@') { }
666 2 6 if (not defined $val) { }
671 2 4 if ($up == 0)
677 5 2 if ($$self{'sym'}) { }
678 0 5 if (not defined $val) { }
683 0 5 if ($up == 0)
689 0 2 if (not defined $val) { }
693 0 2 if ($up == 0)
700 7 3 if ($$self{'sym'}) { }
703 2 5 if ($up == 0)
709 2 1 if ($up == 0)
723 163 2 $$self{'db'} ? :
725 127 38 if ($name) { }
726 54 73 unless ($st = ($$db{'private_ipc_lite_prep'} || {})->{$name})
733 103 62 if ($ok and $$st{'NUM_OF_FIELDS'}) { }
752 1 10 unless ($DEFAULT_PATH{$callpack})
783 3 159 if ($tid != $$self{'tid'})
798 0 185 if (not $tid and $^O =~ /win32/i)
805 185 0 unless ($tid)