Branch Coverage

blib/lib/IPC/Shareable.pm
Criterion Covered Total %
branch 0 294 0.0


line true false branch
129 0 0 unless (exists $global_register{$knot->seg->id})
133 0 0 unless $knot->{'_lock'}
135 0 0 if ($knot->{'_type'} eq 'HASH') { }
0 0 elsif ($knot->{'_type'} eq 'ARRAY') { }
0 0 elsif ($knot->{'_type'} eq 'SCALAR') { }
137 0 0 if $knot->_need_tie($val, $key)
142 0 0 if $knot->_need_tie($val, $i)
147 0 0 if $knot->_need_tie($val)
154 0 0 if ($knot->{'_lock'} & 2) { }
157 0 0 unless (defined $knot->_encode($knot->seg, $knot->{'_data'}))
167 0 0 unless (exists $global_register{$knot->seg->id})
172 0 0 if ($knot->{'_lock'} or $knot->{'_iterating'}) { }
182 0 0 if ($knot->{'_type'} eq 'HASH') { }
0 0 elsif ($knot->{'_type'} eq 'ARRAY') { }
0 0 elsif ($knot->{'_type'} eq 'SCALAR') { }
183 0 0 if (defined $data) { }
191 0 0 if (defined $data) { }
199 0 0 if (defined $data) { }
209 0 0 if (my $inner = _is_kid($val))
219 0 0 if ($knot->{'_type'} eq 'HASH') { }
0 0 elsif ($knot->{'_type'} eq 'ARRAY') { }
230 0 0 if ($knot->{'_lock'} & 2) { }
233 0 0 if (not defined $knot->_encode($knot->seg, $knot->{'_data'}))
242 0 0 unless $knot->{'_lock'}
244 0 0 if ($knot->{'_lock'} & 2) { }
247 0 0 unless (defined $knot->_encode($knot->seg, $knot->{'_data'}))
258 0 0 unless $knot->{'_lock'}
265 0 0 unless $knot->{'_lock'}
275 0 0 if (not defined $next) { }
289 0 0 unless (exists $global_register{$knot->seg->id})
293 0 0 unless $knot->{'_lock'}
296 0 0 if ($knot->{'_lock'} & 2) { }
299 0 0 if (not defined $knot->_encode($knot->seg, $knot->{'_data'}))
307 0 0 unless $knot->{'_lock'}
310 0 0 if ($knot->{'_lock'} & 2) { }
313 0 0 unless (defined $knot->_encode($knot->seg, $knot->{'_data'}))
322 0 0 unless $knot->{'_lock'}
324 0 0 if ($knot->{'_lock'} & 2) { }
327 0 0 unless (defined $knot->_encode($knot->seg, $knot->{'_data'}))
336 0 0 unless $knot->{'_lock'}
338 0 0 if ($knot->{'_lock'} & 2) { }
341 0 0 unless (defined $knot->_encode($knot->seg, $knot->{'_data'}))
350 0 0 unless $knot->{'_lock'}
352 0 0 if ($knot->{'_lock'} & 2) { }
355 0 0 unless (defined $knot->_encode($knot->seg, $knot->{'_data'}))
364 0 0 unless $knot->{'_lock'}
371 0 0 unless $knot->{'_lock'}
373 0 0 if ($knot->{'_lock'} & 2) { }
376 0 0 unless (defined $knot->_encode($knot->seg, $knot->{'_data'}))
390 0 0 if ($type eq "HASH")
394 0 0 if ($type eq "ARRAY")
398 0 0 if ($type eq "SCALAR")
410 0 0 if (not $warning =~ /hash after insertion/)
428 0 0 if (defined $attr) { }
442 0 0 unless defined $flags
444 0 0 if $flags & 8
446 0 0 if $knot->{'_lock'} & $flags
449 0 0 if $knot->{'_lock'}
453 0 0 if ($return_val)
462 0 0 unless $knot->{'_lock'}
463 0 0 if ($knot->{'_was_changed'})
464 0 0 unless (defined $knot->_encode($knot->seg, $knot->{'_data'}))
471 0 0 if $flags & 4
486 0 0 unless $s->attributes("owner") == $$
487 0 0 if $s->attributes("protected")
498 0 0 if $s->attributes("protected")
505 0 0 if (scalar @_ == 2)
508 0 0 if (scalar @_ == 1)
512 0 0 unless (defined $protect_key)
516 0 0 unless ($protect_key =~ /^\d+$/)
527 0 0 if ($stored_key and $stored_key == $protect_key)
538 0 0 unless $s->remove
542 0 0 unless $s->remove
549 0 0 if defined $knot->{'_shm'}
553 0 0 if defined $knot->{'_sem'}
561 0 0 if (not defined $_[0] or $_[0] ne "IPC::Shareable")
567 0 0 unless (defined $glue)
571 0 0 unless defined $warn
596 0 0 if ($serializer eq 'storable') { }
0 0 elsif ($serializer eq 'json') { }
608 0 0 if $s->attributes("protected")
609 0 0 unless $s->attributes("destroy")
610 0 0 if $s->attributes("owner") != $$
619 0 0 if ($serializer eq 'storable') { }
0 0 elsif ($serializer eq 'json') { }
634 0 0 if (length $json > $seg->size)
644 0 0 unless $json
654 0 0 unless (defined $data)
670 0 0 if (length $ice > $seg->size)
680 0 0 unless $ice
684 0 0 if ($tag eq 'IPC::Shareable') { }
686 0 0 unless (defined $water)
697 0 0 if (scalar @_ == 4) { }
713 0 0 if ($knot->attributes("limit") and $shm_size > 1073741824)
721 0 0 if ($knot->attributes('graceful')) { }
727 0 0 unless (defined $exclusive)
728 0 0 if ($knot->attributes("warn"))
740 0 0 unless (defined $seg)
741 0 0 if ($! =~ /Cannot allocate memory/)
746 0 0 if ($! =~ /No space left on device/)
751 0 0 if (not $knot->attributes('create')) { }
0 0 elsif ($knot->attributes('create') and $knot->attributes('exclusive')) { }
767 0 0 unless (defined $sem)
771 0 0 unless ($sem->op(@{$semop_args{1};}))
788 0 0 if ($sem->getval(0) != 1)
790 0 0 unless (exists $global_register{$knot->seg->id})
795 0 0 unless ($sem->setval(0, 1))
807 0 0 defined $opts ? :
810 0 0 if (not defined $opts->{$k}) { }
0 0 elsif ($opts->{$k} eq 'no') { }
814 0 0 if ($^W)
836 0 0 if ($key_str eq '') { }
0 0 elsif ($key_str =~ /^\d+$/) { }
848 0 0 if ($key > 2147483648)
851 0 0 if ($key == 0)
874 0 0 if $used_ids{$key}
887 0 0 if ($shm_slot_available)
889 0 0 if $seg
893 0 0 unless ($verified_exclusive)
913 0 0 if $knot->attributes("create")
914 0 0 if $knot->attributes("exclusive")
924 0 0 if ($parent->{'_key'} == IPC_PRIVATE()) { }
944 0 0 if ($type eq 'HASH') { }
0 0 elsif ($type eq 'ARRAY') { }
0 0 elsif ($type eq 'SCALAR') { }
947 0 0 unless $child
949 0 0 if $opts{'tidy'}
956 0 0 unless $child
958 0 0 if $opts{'tidy'}
965 0 0 unless $child
976 0 0 unless my $data = shift()
979 0 0 unless $type
983 0 0 if ($type eq 'HASH') { }
0 0 elsif ($type eq 'ARRAY') { }
0 0 elsif ($type eq 'SCALAR') { }
993 0 0 if (ref $obj eq "IPC::Shareable")
1003 0 0 unless $type
1007 0 0 if ($type eq 'HASH') { }
0 0 elsif ($type eq 'ARRAY') { }
0 0 elsif ($type eq 'SCALAR') { }
1017 0 0 $need_tie ? :
1024 0 0 if ($parent_type eq 'HASH') { }
0 0 elsif ($parent_type eq 'ARRAY') { }
1026 0 0 if (exists $data->{$id} and keys %{$$data{$id};} and tied %{$$data{$id};})
1032 0 0 if (exists $data->[$id] and tied @{$$data[$id];})
1046 0 0 if (ref $_ eq 'IPC::Shareable') { }
1062 0 0 if (ref $_ eq 'IPC::Shareable') { }