Branch Coverage

blib/lib/Set/Relation/V2.pm
Criterion Covered Total %
branch 149 580 25.6


line true false branch
20 0 32 unless &blessed($self)
22 0 32 unless defined $role_name
24 0 32 unless $self->isa("Set::Relation::V2")
26 32 0 if $role_name eq "Set::Relation"
39 121 270 if scalar @_
53 99 294 if scalar @_
68 115 194 if scalar @_
77 61 0 if scalar @_
99 61 60 if scalar @_
113 61 0 if scalar @_
144 22 39 if (@args == 1) { }
39 0 elsif (scalar @args % 2 == 0) { }
145 22 0 if (ref $args[0] ne 'HASH') { }
174 39 22 if (not defined $members) { }
0 22 elsif (not ref $members) { }
0 22 elsif (&blessed($members) and $members->can('does') and $members->does('Set::Relation') and not $members->isa('Set::Relation::V2')) { }
189 0 61 if ref $members ne "ARRAY" and not &blessed($members) && $members->isa('Set::Relation::V2')
196 61 0 if (not defined $keys) { }
0 0 elsif (ref $keys ne 'ARRAY') { }
202 0 61 if (&any(sub { ref $_ ne "ARRAY"; } , @{$keys;}))
208 0 0 if defined $_
0 0 if ref $key ne "ARRAY" or ¬all(sub { not ref $_ if defined $_; } , @{$key;})
222 0 61 if (&blessed($members) and $members->isa('Set::Relation::V2')) { }
40 21 elsif (@{$members;} == 0) { }
238 0 21 if (not defined $member0) { }
0 21 elsif (not ref $member0) { }
12 9 elsif (ref $member0 eq 'HASH') { }
9 0 elsif (ref $member0 eq 'ARRAY') { }
249 0 0 if defined $_
0 0 if ¬all(sub { not ref $_ if defined $_; } , @{$members;})
252 0 0 if &uniqstr(@{$members;}) != @{$members;}
261 0 44 if ref $tuple ne "HASH" or not $self->_is_identical_hkeys($heading, $tuple)
268 0 44 if $self->_tuple_arg_has_circular_refs($tuple)
278 3 9 if (@{$members;} == 1)
290 0 9 if @{$members;} != 2 or ref $member1 ne "ARRAY"
296 33 0 if defined $_
0 9 if ¬all(sub { not ref $_ if defined $_; } , @{$member0;})
299 0 9 if &uniqstr(@{$member0;}) != @{$member0;}
307 0 35 if ref $tuple ne "ARRAY" or @{$tuple;} != @{$member0;}
313 0 125 if ref $_ eq "HASH"
315 0 35 if &any(sub { $self->_tuple_arg_has_circular_refs($_) if ref $_ eq "HASH"; } , @{$tuple;})
321 1 8 if (@{$member1;} == 1)
338 0 0 if ¬all(sub { exists $self_h->{$_}; } , @{$key;})
339 0 0 unless $self->_has_key($key)
371 0 0 unless (defined $ident_str)
392 5 28 unless ($allow_dup_tuples or $self->_is_known_dup_free)
395 2 31 if ($want_ord_attrs) { }
0 31 elsif (CORE::keys %{$self->_body;} == 0) { }
424 0 0 unless ($allow_dup_tuples or $self->_is_known_dup_free)
427 0 0 if ($want_ord_attrs) { }
454 0 0 unless not ref $want_ord_attrs and $want_ord_attrs eq 1 or ref $want_ord_attrs eq "ARRAY" and @{$want_ord_attrs;} == @{$attr_names;} and &all(sub { exists $heading->{$_}; } , @{$want_ord_attrs;})
457 2 0 $want_ord_attrs eq '1' ? :
472 0 0 if @{$proj_only;} > 0
474 0 0 unless ($allow_dup_tuples or $self->_is_known_dup_free)
478 0 0 if ($want_ord_attrs) { }
479 0 0 if $want_ord_attrs ne 1
502 0 4 unless exists $self->_heading->{$name}
504 0 4 unless ($allow_dup_tuples or $self->_is_known_dup_free)
510 0 6 if (ref $atvl eq "HASH")
531 13 0 if (ref $t eq "HASH")
534 0 13 if ref $t ne "ARRAY"
538 0 13 if ref $tuple ne "HASH" or not $r->_is_identical_hkeys($r_h, $tuple)
543 0 13 if $r->_tuple_arg_has_circular_refs($tuple)
561 0 57 $ancs_of_tup_atvls ? :
564 0 231 if (ref $atvl eq "HASH")
566 0 0 if exists $$ancs_of_tup_atvls{&refaddr($atvl)}
567 0 0 if $self->_tuple_arg_has_circular_refs($atvl, $ancs_of_tup_atvls)
601 0 701 if (not defined $value) { }
543 158 elsif (not ref $value) { }
158 0 elsif (not &blessed($value)) { }
613 158 0 if (ref $value eq 'HASH') { }
630 0 0 if ($value->isa('Set::Relation::V2')) { }
649 0 231 if (ref $atvl eq 'HASH') { }
0 231 elsif (&blessed($atvl) and $atvl->can('does') and $atvl->does('Set::Relation') and not $atvl->isa('Set::Relation::V2')) { }
666 0 724 if (ref $atvl eq "HASH")
678 0 125 if (ref $atvl eq 'HASH') { }
0 125 elsif (&blessed($atvl) and $atvl->can('does') and $atvl->does('Set::Relation') and not $atvl->isa('Set::Relation::V2')) { }
694 0 12 if (ref $atvl eq "HASH")
733 87 32 if ($topic->_is_known_dup_free) { }
1 31 elsif ($on_entry_body_cardinality == 0) { }
15 16 elsif ($allow_dup_tuples) { }
777 0 0 if ¬all(sub { exists $topic_h->{$_}; } , @{$attr_names;})
789 0 0 if exists $keys->{$subheading_ident_str}
794 0 0 if ¬all(sub { CORE::keys %{$_;} == 1; } , values %{$index;})
804 1 31 if ($topic->is_empty)
817 0 13 if (@{$t;} == 0)
838 0 0 if (@{$t;} == 0)
853 0 0 unless (exists $tuples->{$tuple_ident_str})
869 0 1 if ref $map ne "HASH"
874 4 0 if defined $_
0 1 if ¬all(sub { not ref $_ if defined $_; } , values %{$map;})
878 0 1 if &uniqstr(values %{$map;}) != CORE::keys %{$map;}
885 0 1 if @{$map_hvals_not_in_topic;} > 0
893 0 1 if @{$map_hkeys_same_as_topic_no_ren;} > 0
905 0 1 if (scalar CORE::keys %{$map;} == 0)
913 4 0 exists $inv_map->{$_} ? :
929 1 0 if ($topic->_is_known_dup_free)
948 0 1 if @{$proj_only;} > 0
956 0 1 if (@{$attr_names;} == 0)
958 0 0 if ($topic->is_empty) { }
965 0 1 if (@{$attr_names;} == $topic->degree)
997 0 0 if @{$cproj_only;} > 0
1016 0 0 if @{$inner_attrs_not_in_topic;} > 0
1020 0 0 if &any(sub { $_ eq $outer; } , @{$topic_attrs_no_wr;})
1036 0 0 if ($topic->is_empty) { }
0 0 elsif (@{$inner;} == 0) { }
0 0 elsif (@{$topic_attrs_no_wr;} == 0) { }
1068 0 0 if ($topic->_is_known_dup_free)
1087 0 0 if ¬all(sub { exists $topic_h->{$_}; } , @{$cmpl_inner;})
1097 0 0 if &any(sub { $_ eq $outer; } , @{$topic_attrs_no_wr;})
1115 0 0 unless exists $topic_h->{$outer}
1126 0 0 if @{$inner_attrs_dupl_topic;} > 0
1132 0 0 if ref $inner_t ne "HASH" or not $topic->_is_identical_hkeys($inner_h, $inner_t)
1145 0 0 if ($topic->is_empty) { }
0 0 elsif (@{$topic_attrs_no_uwr;} == 0) { }
0 0 elsif (@{$inner;} == 0) { }
1177 0 0 if ($topic->_is_known_dup_free)
1197 0 1 if @{$inner_attrs_not_in_topic;} > 0
1201 0 1 if &any(sub { $_ eq $outer; } , @{$topic_attrs_no_gr;})
1214 0 1 if ($topic->is_empty) { }
0 1 elsif (@{$inner;} == 0) { }
0 1 elsif (@{$topic_attrs_no_gr;} == 0) { }
1259 1 0 if ($topic->_is_known_dup_free)
1278 0 0 if ¬all(sub { exists $topic_h->{$_}; } , @{$group_per;})
1288 0 0 if &any(sub { $_ eq $outer; } , @{$topic_attrs_no_gr;})
1306 0 0 unless exists $topic_h->{$outer}
1317 0 0 if @{$inner_attrs_dupl_topic;} > 0
1323 0 0 unless &blessed($inner_r) and $inner_r->isa("Set::Relation::V2") and $topic->_is_identical_hkeys($inner_h, $inner_r->_heading)
1331 0 0 if ($topic->degree == 1)
1347 0 0 if (@{$topic_tuples_w_nonemp_inn;} == 0) { }
0 0 elsif (@{$inner;} == 0) { }
1384 0 0 if $topic->degree != 2
1388 0 0 if ($topic->cardinality < 2)
1410 0 0 unless ($xy->_is_known_dup_free)
1417 0 0 if ($xyz->is_empty)
1429 0 0 if ($ttt->_is_identical($xy))
1448 0 16 if ($topic->is_empty)
1452 0 16 unless ($allow_dup_tuples or $topic->_is_known_dup_free)
1468 16 58 if ($is_matched)
1473 16 0 if ($topic->_is_known_dup_free)
1489 0 0 if ($topic->is_empty)
1493 0 0 unless ($allow_dup_tuples or $topic->_is_known_dup_free)
1511 0 0 if ($is_matched) { }
1519 0 0 if ($topic->_is_known_dup_free)
1532 0 0 if ($topic->is_empty)
1536 0 0 unless ($allow_dup_tuples or $topic->_is_known_dup_free)
1552 0 0 unless ($is_matched)
1557 0 0 if ($topic->_is_known_dup_free)
1581 0 0 if ($topic->is_empty)
1587 0 0 unless ($allow_dup_tuples or $topic->_is_known_dup_free)
1603 0 0 unless (exists $tuples_per_class->{$class_ident_str})
1626 0 0 if ($topic->_is_known_dup_free)
1647 0 0 if @{$both;} > 0
1656 0 0 if (@{$attr_names;} == 0)
1661 0 0 unless ($allow_dup_tuples or $topic->_is_known_dup_free)
1684 0 0 if ($topic->_is_known_dup_free)
1696 0 0 if ref $attrs ne "HASH"
1703 0 0 if @{$both;} > 0
1705 0 0 if $topic->_tuple_arg_has_circular_refs($attrs)
1716 0 0 if (scalar CORE::keys %{$attrs;} == 0)
1735 0 0 if ($topic->_is_known_dup_free)
1752 0 0 if (@{$result_attr_names;} == 0)
1754 0 0 if ($topic->is_empty) { }
1762 0 0 unless ($allow_dup_tuples or $topic->_is_known_dup_free)
1805 0 0 if ¬all(sub { exists $topic_h->{$_}; } , @{$group_per;})
1810 0 0 if &any(sub { exists $group_per_h->{$_}; } , @{$summ_attr_names;})
1822 0 0 if ($topic->is_empty)
1827 0 0 unless ($allow_dup_tuples or $topic->_is_known_dup_free)
1884 0 0 if ¬all(sub { exists $topic_h->{$_}; } , @{$group_per;})
1889 0 0 if exists $group_per_h->{$count_attr_name}
1901 0 0 if ($topic->is_empty)
1906 0 0 unless ($allow_dup_tuples or $topic->_is_known_dup_free)
1934 1 1 if (defined $atnms and not ref $atnms)
1937 0 2 if ref $atnms ne "ARRAY"
1943 4 0 if defined $_
0 2 if ¬all(sub { not ref $_ if defined $_; } , @{$atnms;})
1947 0 2 if &uniqstr(@{$atnms;}) != @{$atnms;}
1955 0 5 if not defined $atnm or ref $atnm
1963 0 0 if not defined $atnm or ref $atnm or not $atnm =~ /^[0-9]+$/
1971 0 16 if ref $func ne "CODE"
1979 0 0 if ref $result_t ne "HASH" or not $self->_is_identical_hkeys($heading, $result_t)
1985 0 0 if $self->_tuple_arg_has_circular_refs($result_t)
1994 0 0 if (&blessed($other) and $other->can("does") and $other->does("Set::Relation") and not $other->isa("Set::Relation::V2"))
1999 0 0 unless &blessed($other) and $other->isa("Set::Relation::V2") and $self->_is_identical_hkeys($self->_heading, $other->_heading)
2010 0 22 if (&blessed($other) and $other->can("does") and $other->does("Set::Relation") and not $other->isa("Set::Relation::V2"))
2015 0 22 unless &blessed($other) and $other->isa("Set::Relation::V2")
2104 0 2 if (@{$inputs;} == 0)
2108 0 2 if (@{$inputs;} == 1)
2136 0 0 if (@{$inputs;} == 0)
2140 0 0 if (@{$inputs;} == 1)
2157 0 0 if (exists $t_by_ident_str->{$tuple_ident_str}) { }
2194 0 1 if (@{$others;} == 0)
2204 0 1 if ($smallest->is_empty)
2222 1 2 unless exists $larger_i->{$tuple_ident_str}
2240 3 0 if (&blessed($others) and $others->can("does") and $others->does("Set::Relation"))
2244 0 3 if ref $others ne "ARRAY"
2249 0 3 if (&blessed($other) and $other->can("does") and $other->does("Set::Relation") and not $other->isa("Set::Relation::V2"))
2254 0 3 unless &blessed($other) and $other->isa("Set::Relation::V2") and $self->_is_identical_hkeys($self_h, $other->_heading)
2269 2 0 if (&blessed($others) and $others->can("does") and $others->does("Set::Relation"))
2273 0 2 if ref $others ne "ARRAY"
2278 0 2 if (&blessed($other) and $other->can("does") and $other->does("Set::Relation") and not $other->isa("Set::Relation::V2"))
2283 0 2 unless &blessed($other) and $other->isa("Set::Relation::V2")
2303 0 0 if ($source->is_empty or $filter->is_empty)
2319 0 0 unless (exists $filter_i->{$tuple_ident_str})
2336 0 0 if ($source->is_empty or $filter->is_empty)
2356 0 0 if ($source->is_empty)
2359 0 0 if ($filter->is_empty)
2376 0 0 if ($source->is_empty)
2379 0 0 if ($filter->is_empty)
2385 0 0 if ($source->is_nullary or $filter->is_nullary)
2394 0 0 if (@{$both;} == 0)
2398 0 0 if (@{$source_only;} == 0 and @{$filter_only;} == 0)
2413 0 0 $source->cardinality(1) < $filter->cardinality(1) ? :
2422 0 0 if (exists $lg_index->{$subtuple_ident_str})
2431 0 0 if ($source->_is_known_dup_free and $filter->_is_known_dup_free)
2450 0 2 if (@{$others;} == 0)
2456 0 2 if (&any(sub { $_->is_empty; } , @{$inputs;}))
2471 0 2 if (@{$inputs;} == 0)
2475 0 2 if (@{$inputs;} == 1)
2494 0 2 if (@{$both;} == 0)
2499 0 2 if (@{$result_only;} == 0 and @{$input_only;} == 0)
2507 0 2 if (@{$result_only;} == 0)
2513 0 2 if (@{$input_only;} == 0)
2536 2 0 $topic->cardinality(1) < $other->cardinality(1) ? :
2544 5 2 if (exists $lg_index->{$subtuple_ident_str})
2557 2 0 if ($topic->_is_known_dup_free and $other->_is_known_dup_free)
2572 0 0 if (@{$others;} == 0)
2584 0 0 if &uniqstr(@{$attr_names;}) != @{$attr_names;}
2586 0 0 if (&any(sub { $_->is_empty; } , @{$inputs;}))
2600 0 0 if (@{$inputs;} == 0)
2604 0 0 if (@{$inputs;} == 1)
2625 0 0 $topic->cardinality(1) < $other->cardinality(1) ? :
2640 0 0 if ($topic->_is_known_dup_free and $other->_is_known_dup_free)
2661 0 0 if @{$divisor_only;} > 0
2665 0 0 if ($dividend->is_empty or $divisor->is_empty)
2672 0 0 if ($dividend->is_nullary or $divisor->is_nullary)
2699 0 0 if ($topic->is_empty or $other->is_empty)
2706 0 0 if ($topic->is_nullary)
2710 0 0 if ($other->is_nullary)
2717 0 0 if (@{$both;} == 0)
2721 0 0 if (@{$topic_only;} == 0 and @{$other_only;} == 0)
2728 0 0 if (@{$topic_only;} == 0)
2734 0 0 if (@{$other_only;} == 0)
2764 0 5 if (@{$atnms;} == $self->degree)
2772 5 0 unless (exists $indexes->{$subheading_ident_str})
2798 28 27 unless (exists $indexes->{$heading_ident_str})
2808 4 127 if (exists $index->{$tuple_ident_str})
2816 2 26 if (CORE::keys %{$extras_to_delete;} > 0)
2819 2 0 if $subheading_ident_str eq $heading_ident_str
2854 0 0 if exists $primary_h->{$group_attr}
2879 0 0 if exists $topic_h->{$name}
2887 0 0 if ($topic->is_empty)
2891 0 0 unless ($topic->_is_known_dup_free)
2933 0 0 if exists $topic_h->{$name}
2942 0 0 if ($topic->is_empty)
2948 0 0 unless ($topic->_is_known_dup_free)
2969 0 0 if (defined $order_by and not ref $order_by)
2972 0 0 if ref $order_by ne "ARRAY"
2979 0 0 @{$_;} == 2 ? :
0 0 @{$_;} == 1 ? :
0 0 ref $_ ne 'ARRAY' ? :
2987 0 0 if ref $_ eq "ARRAY" and @{$_;} == 3 and defined $_->[0] and not ref $_->[0]
2991 0 0 if ¬all(sub { not defined $_->[2] or $_->[2] eq "cmp" or $_->[2] eq "<=>" if ref $_ eq "ARRAY" and @{$_;} == 3 and defined $_->[0] and not ref $_->[0]; } , @{$order_by;})
2997 0 0 if &uniqstr(@{$atnms;}) != @{$atnms;}
3003 0 0 if ¬all(sub { exists $topic_h->{$_}; } , @{$atnms;})
3019 0 0 $is_reverse_order ? :
3027 0 0 if (my $err = $@)
3044 0 0 if $max_rank < $min_rank
3047 0 0 if ($topic->is_empty)
3051 0 0 unless ($topic->_is_known_dup_free)
3099 0 0 if $max_rank < $min_rank
3103 0 0 if ($topic->is_empty)
3109 0 0 unless ($topic->_is_known_dup_free)
3145 0 0 if @{$subst_only;} > 0
3156 0 0 if ($topic->is_empty)
3159 0 0 if (@{$attrs;} == 0)
3164 0 0 unless ($allow_dup_tuples or $topic->_is_known_dup_free)
3200 0 0 if ref $attrs ne "HASH"
3207 0 0 if @{$subst_only;} > 0
3209 0 0 if $topic->_tuple_arg_has_circular_refs($attrs)
3220 0 0 if ($topic->is_empty)
3223 0 0 if (scalar CORE::keys %{$attrs;} == 0)
3344 0 0 if exists $primary_h->{$group_attr}
3365 0 0 if ($primary->_is_known_dup_free and $secondary->_is_known_dup_free)
3394 0 0 if ($primary->_is_known_dup_free and $secondary->_is_known_dup_free)
3410 0 0 if ref $filler ne "HASH"
3413 0 0 if $primary->_tuple_arg_has_circular_refs($filler)
3422 0 0 unless $primary->_is_identical_hkeys($exten_h, $filler)
3437 0 0 if ($primary->_is_known_dup_free and $secondary->_is_known_dup_free)
3472 0 0 if ($primary->_is_known_dup_free and $secondary->_is_known_dup_free)