Branch Coverage

blib/lib/Array/AsObject.pm
Criterion Covered Total %
branch 151 194 77.8


line true false branch
30 14 16 if @array
43 9 237 if $$self{'err'}
61 3 3 if ($full) { }
70 0 15 if (not defined $ele) { }
4 11 elsif (ref $ele) { }
71 0 0 if ($undef) { }
81 1 3 if (exists $refs{$s}) { }
92 4 7 if (exists $scal{$ele}) { }
110 4 11 if not defined $ele or ref $ele
111 4 7 if (exists $tmp{$ele}) { }
127 0 14 if (not @n) { }
2 22 elsif ($#n > 0 and not wantarray) { }
136 0 12 unless (@list)
145 12 2 if ($n =~ /^[+-]?\d+$/) { }
146 4 8 if ($n < -$len or $n > $len - 1)
157 4 2 if (wantarray) { }
167 0 36 if $self->err
174 1 73 unless @val
178 0 76 if $self->err
179 25 51 unless @idx
189 0 1 unless (@list)
202 0 1 unless (@list)
219 211 414 if _eq($self, $val, $ele)
222 156 29 if (wantarray) { }
23 6 elsif (@idx) { }
235 25 8 if (wantarray) { }
5 3 elsif (@idx) { }
249 2 4 if $#list == -1
252 2 3 if $undef and not defined $ele
270 40 41 if (@list) { }
281 20 605 if (not defined $val1 || defined $val2) { }
121 484 elsif (not defined $val1 && defined $val2) { }
8 476 elsif (ref $val1 and ref $val2 and scalar $val1 eq scalar $val2) { }
28 448 elsif (ref $val1 or ref $val2) { }
183 265 elsif ($val1 eq $val2) { }
306 1 2 if ($undef) { }
324 3 2 if defined $ele
336 15 21 if ($all) { }
338 3 12 unless @idx
341 3 18 if $idx == -1
345 4 26 if ($undef) { }
364 0 6 unless ($idx =~ /^[+-]?\d+$/)
368 0 6 if ($idx < -($#list + 1) or $idx > $#list)
373 0 6 if ($idx < 0)
379 1 1 if ($undef) { }
397 1 6 unless $start
398 0 7 unless ($start =~ /^[+-]?\d+$/)
402 1 6 if ($start < -($#list + 1) or $start > $#list + 1)
407 1 5 if ($start < 0)
411 4 2 unless (defined $length)
412 1 3 if ($start > $#list) { }
419 0 6 unless ($length =~ /^\d+$/)
436 1 1 unless (defined $method)
441 0 2 if $self->err
449 1 1 unless (defined $method)
454 0 2 if $self->err
507 1 4 unless defined $n
510 0 5 unless ($n =~ /^[+-]?\d+$/)
516 3 2 if ($n > 0) { }
2 0 elsif ($n < 0) { }
535 0 2 unless (defined $index)
542 0 2 unless ($index =~ /^[+-]?\d+$/)
546 0 2 if ($index < -($#list + 1) or $index > $#list)
559 1 1 unless (defined $method)
564 0 2 if $self->err
574 0 6 unless (sort_valid_method($method))
590 0 3 unless $start
591 0 3 unless ($start =~ /^[+-]?\d+$/)
595 0 3 if ($start < -($#list + 1) or $start > $#list)
600 1 2 if ($start < 0)
604 0 3 unless (defined $length)
605 0 0 if ($start > $#list) { }
612 0 3 unless ($length =~ /^\d+$/)
633 0 12 if (not defined $ele) { }
7 5 elsif (not exists $list{$ele}) { }
634 0 0 unless ($undef)
658 0 2 if (ref $obj2 ne $class)
667 1 1 $unique ? :
681 0 2 if (ref $obj2 ne $class)
694 1 1 $unique ? :
698 5 3 if ($tmp->exists($ele))
712 0 8 if (ref $obj2 ne $class)
719 4 4 if ($unique)
721 0 10 unless $obj2->exists($ele)
724 0 8 unless $obj1->exists($ele)
730 2 8 if $obj1->count($ele) != $obj2->count($ele)
744 0 5 if (ref $obj2 ne $class)
750 2 3 if ($unique)
752 0 5 unless $obj1->exists($ele)
758 1 5 if $obj2->count($ele) > $obj1->count($ele)
773 0 2 if (ref $obj2 ne $class)
786 1 1 $unique ? :
789 4 10 if ($tmp1->exists($ele) and $tmp2->exists($ele)) { }
5 5 elsif ($tmp1->exists($ele)) { }
0 5 elsif ($tmp2->exists($ele)) { }
810 0 2 if (ref $obj2 ne $class)
819 1 1 if ($unique)