Branch Coverage

blib/lib/Set/Relation/V1.pm
Criterion Covered Total %
branch 134 538 24.9


line true false branch
20 0 47 unless &blessed($self)
22 0 47 unless defined $role_name
24 0 47 unless $self->isa("Set::Relation::V1")
26 47 0 if $role_name eq "Set::Relation" or $role_name eq "Set::Relation::Mutable"
40 123 163 if scalar @_
48 123 17 if scalar @_
68 100 183 if scalar @_
76 138 0 if scalar @_
90 65 3 if scalar @_
112 62 18 if scalar @_
126 77 28 if scalar @_
137 65 0 if scalar @_
165 0 62 if (exists $params->{'has_frozen_identity'})
166 0 0 $params->{'has_frozen_identity'} ? :
178 37 25 if (@args == 1) { }
25 0 elsif (scalar @args % 2 == 0) { }
179 37 0 if (ref $args[0] ne 'HASH') { }
208 25 37 if (not defined $members) { }
0 37 elsif (not ref $members) { }
0 37 elsif (&blessed($members) and $members->can('does') and $members->does('Set::Relation') and not $members->isa('Set::Relation::V1')) { }
223 0 62 if ref $members ne "ARRAY" and not &blessed($members) && $members->isa('Set::Relation::V1')
230 62 0 if (not defined $keys) { }
0 0 elsif (ref $keys ne 'ARRAY') { }
236 0 62 if (&any(sub { ref $_ ne "ARRAY"; } , @{$keys;}))
242 0 0 if defined $_
0 0 if ref $key ne "ARRAY" or ¬all(sub { not ref $_ if defined $_; } , @{$key;})
247 15 47 if (&blessed($members) and $members->isa('Set::Relation::V1')) { }
26 21 elsif (@{$members;} == 0) { }
262 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') { }
273 0 0 if defined $_
0 0 if ¬all(sub { not ref $_ if defined $_; } , @{$members;})
276 0 0 if &uniqstr(@{$members;}) != @{$members;}
286 0 44 if ref $tuple ne "HASH" or not $self->_is_identical_hkeys($heading, $tuple)
293 0 44 if $self->_tuple_arg_has_circular_refs($tuple)
314 0 9 if @{$members;} != 2 or ref $member1 ne "ARRAY"
320 33 0 if defined $_
0 9 if ¬all(sub { not ref $_ if defined $_; } , @{$member0;})
323 0 9 if &uniqstr(@{$member0;}) != @{$member0;}
331 0 35 if ref $tuple ne "ARRAY" or @{$tuple;} != @{$member0;}
337 0 125 if ref $_ eq "HASH"
339 0 35 if &any(sub { $self->_tuple_arg_has_circular_refs($_) if ref $_ eq "HASH"; } , @{$tuple;})
361 0 0 if ¬all(sub { exists $self_h->{$_}; } , @{$key;})
362 0 0 unless $self->_has_key($key)
402 3 0 unless (defined $ident_str)
423 2 31 if ($want_ord_attrs) { }
0 31 elsif (CORE::keys %{$self->_body;} == 0) { }
452 0 0 if ($want_ord_attrs) { }
479 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;})
482 2 0 $want_ord_attrs eq '1' ? :
497 0 0 if @{$proj_only;} > 0
499 0 0 if ($want_ord_attrs) { }
500 0 0 if $want_ord_attrs ne 1
523 0 4 unless exists $self->_heading->{$name}
527 0 6 if (ref $atvl eq "HASH")
548 13 0 if (ref $t eq "HASH")
551 0 13 if ref $t ne "ARRAY"
555 0 13 if ref $tuple ne "HASH" or not $r->_is_identical_hkeys($r_h, $tuple)
560 0 13 if $r->_tuple_arg_has_circular_refs($tuple)
578 0 57 $ancs_of_tup_atvls ? :
581 0 231 if (ref $atvl eq "HASH")
583 0 0 if exists $$ancs_of_tup_atvls{&refaddr($atvl)}
584 0 0 if $self->_tuple_arg_has_circular_refs($atvl, $ancs_of_tup_atvls)
597 0 0 if (&blessed($atvl) and $atvl->isa('Set::Relation::V1')) { }
0 0 elsif (ref $atvl eq 'HASH') { }
598 0 0 if &refaddr($atvl) == &refaddr($self)
602 0 0 if $self->_self_is_component_of_tuple_arg($atvl)
635 0 507 if (not defined $value) { }
356 151 elsif (not ref $value) { }
151 0 elsif (not &blessed($value)) { }
647 151 0 if (ref $value eq 'HASH') { }
664 0 0 if ($value->isa('Set::Relation::V1')) { }
683 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::V1')) { }
700 0 724 if (ref $atvl eq "HASH")
712 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::V1')) { }
728 0 12 if (ref $atvl eq "HASH")
787 0 0 if ¬all(sub { exists $topic_h->{$_}; } , @{$attr_names;})
799 0 0 if exists $keys->{$subheading_ident_str}
804 0 0 if ¬all(sub { CORE::keys %{$_;} == 1; } , values %{$index;})
814 0 17 if ($topic->is_empty)
826 0 13 if (@{$t;} == 0)
835 0 0 if (@{$t;} == 0)
846 0 1 if ref $map ne "HASH"
851 4 0 if defined $_
0 1 if ¬all(sub { not ref $_ if defined $_; } , values %{$map;})
855 0 1 if &uniqstr(values %{$map;}) != CORE::keys %{$map;}
862 0 1 if @{$map_hvals_not_in_topic;} > 0
870 0 1 if @{$map_hkeys_same_as_topic_no_ren;} > 0
882 0 1 if (scalar CORE::keys %{$map;} == 0)
890 4 0 exists $inv_map->{$_} ? :
924 0 1 if @{$proj_only;} > 0
932 0 1 if (@{$attr_names;} == 0)
934 0 0 if ($topic->is_empty) { }
941 0 1 if (@{$attr_names;} == $topic->degree)
957 3 2 unless (exists $result_b->{$result_t_ident_str})
978 0 0 if @{$cproj_only;} > 0
997 0 0 if @{$inner_attrs_not_in_topic;} > 0
1001 0 0 if &any(sub { $_ eq $outer; } , @{$topic_attrs_no_wr;})
1018 0 0 if ($topic->is_empty) { }
0 0 elsif (@{$inner;} == 0) { }
0 0 elsif (@{$topic_attrs_no_wr;} == 0) { }
1072 0 0 if ¬all(sub { exists $topic_h->{$_}; } , @{$cmpl_inner;})
1082 0 0 if &any(sub { $_ eq $outer; } , @{$topic_attrs_no_wr;})
1100 0 0 unless exists $topic_h->{$outer}
1111 0 0 if @{$inner_attrs_dupl_topic;} > 0
1117 0 0 if ref $inner_t ne "HASH" or not $topic->_is_identical_hkeys($inner_h, $inner_t)
1131 0 0 if ($topic->is_empty) { }
0 0 elsif (@{$topic_attrs_no_uwr;} == 0) { }
0 0 elsif (@{$inner;} == 0) { }
1182 0 1 if @{$inner_attrs_not_in_topic;} > 0
1186 0 1 if &any(sub { $_ eq $outer; } , @{$topic_attrs_no_gr;})
1200 0 1 if ($topic->is_empty) { }
0 1 elsif (@{$inner;} == 0) { }
0 1 elsif (@{$topic_attrs_no_gr;} == 0) { }
1271 0 0 if ¬all(sub { exists $topic_h->{$_}; } , @{$group_per;})
1281 0 0 if &any(sub { $_ eq $outer; } , @{$topic_attrs_no_gr;})
1299 0 0 unless exists $topic_h->{$outer}
1310 0 0 if @{$inner_attrs_dupl_topic;} > 0
1316 0 0 unless &blessed($inner_r) and $inner_r->isa("Set::Relation::V1") and $topic->_is_identical_hkeys($inner_h, $inner_r->_heading)
1324 0 0 if ($topic->degree == 1)
1341 0 0 if (@{$topic_tuples_w_nonemp_inn;} == 0) { }
0 0 elsif (@{$inner;} == 0) { }
1381 0 0 if $topic->degree != 2
1385 0 0 if ($topic->cardinality < 2)
1410 0 0 if ($xyz->is_empty)
1422 0 0 if ($ttt->_is_identical($xy))
1441 0 16 if ($topic->is_empty)
1457 16 58 if ($is_matched)
1475 0 0 if ($topic->is_empty)
1493 0 0 if ($is_matched) { }
1511 0 0 if ($topic->is_empty)
1527 0 0 unless ($is_matched)
1554 0 0 if ($topic->is_empty)
1574 0 0 unless (exists $tuples_per_class->{$class_ident_str})
1623 0 0 if @{$both;} > 0
1631 0 0 if (@{$attr_names;} == 0)
1666 0 0 if ref $attrs ne "HASH"
1673 0 0 if @{$both;} > 0
1675 0 0 if $topic->_tuple_arg_has_circular_refs($attrs)
1686 0 0 if (scalar CORE::keys %{$attrs;} == 0)
1721 0 0 if (@{$result_attr_names;} == 0)
1723 0 0 if ($topic->is_empty) { }
1748 0 0 unless (exists $result_b->{$result_t_ident_str})
1775 0 0 if ¬all(sub { exists $topic_h->{$_}; } , @{$group_per;})
1780 0 0 if &any(sub { exists $group_per_h->{$_}; } , @{$summ_attr_names;})
1793 0 0 if ($topic->is_empty)
1833 0 0 unless (exists $result_b->{$result_t_ident_str})
1857 0 0 if ¬all(sub { exists $topic_h->{$_}; } , @{$group_per;})
1862 0 0 if exists $group_per_h->{$count_attr_name}
1875 0 0 if ($topic->is_empty)
1889 0 0 unless (exists $result_b->{$result_t_ident_str})
1908 1 1 if (defined $atnms and not ref $atnms)
1911 0 2 if ref $atnms ne "ARRAY"
1917 4 0 if defined $_
0 2 if ¬all(sub { not ref $_ if defined $_; } , @{$atnms;})
1921 0 2 if &uniqstr(@{$atnms;}) != @{$atnms;}
1929 0 5 if not defined $atnm or ref $atnm
1937 0 0 if not defined $atnm or ref $atnm or not $atnm =~ /^[0-9]+$/
1945 0 16 if ref $func ne "CODE"
1953 0 0 if ref $result_t ne "HASH" or not $self->_is_identical_hkeys($heading, $result_t)
1959 0 0 if $self->_tuple_arg_has_circular_refs($result_t)
1968 0 0 if (&blessed($other) and $other->can("does") and $other->does("Set::Relation") and not $other->isa("Set::Relation::V1"))
1973 0 0 unless &blessed($other) and $other->isa("Set::Relation::V1") and $self->_is_identical_hkeys($self->_heading, $other->_heading)
1984 0 22 if (&blessed($other) and $other->can("does") and $other->does("Set::Relation") and not $other->isa("Set::Relation::V1"))
1989 0 22 unless &blessed($other) and $other->isa("Set::Relation::V1")
2078 0 2 if (@{$inputs;} == 0)
2082 0 2 if (@{$inputs;} == 1)
2098 2 2 unless (exists $result_b->{$tuple_ident_str})
2123 0 0 if (@{$inputs;} == 0)
2127 0 0 if (@{$inputs;} == 1)
2143 0 0 if (exists $result_b->{$tuple_ident_str}) { }
2174 0 1 if (@{$others;} == 0)
2184 0 1 if ($smallest->is_empty)
2200 1 2 unless exists $larger_b->{$tuple_ident_str}
2216 3 0 if (&blessed($others) and $others->can("does") and $others->does("Set::Relation"))
2220 0 3 if ref $others ne "ARRAY"
2225 0 3 if (&blessed($other) and $other->can("does") and $other->does("Set::Relation") and not $other->isa("Set::Relation::V1"))
2230 0 3 unless &blessed($other) and $other->isa("Set::Relation::V1") and $self->_is_identical_hkeys($self_h, $other->_heading)
2245 2 0 if (&blessed($others) and $others->can("does") and $others->does("Set::Relation"))
2249 0 2 if ref $others ne "ARRAY"
2254 0 2 if (&blessed($other) and $other->can("does") and $other->does("Set::Relation") and not $other->isa("Set::Relation::V1"))
2259 0 2 unless &blessed($other) and $other->isa("Set::Relation::V1")
2279 0 0 if ($source->is_empty or $filter->is_empty)
2295 0 0 unless (exists $filter_b->{$tuple_ident_str})
2310 0 0 if ($source->is_empty or $filter->is_empty)
2330 0 0 if ($source->is_empty)
2333 0 0 if ($filter->is_empty)
2350 0 0 if ($source->is_empty)
2353 0 0 if ($filter->is_empty)
2359 0 0 if ($source->is_nullary or $filter->is_nullary)
2368 0 0 if (@{$both;} == 0)
2372 0 0 if (@{$source_only;} == 0 and @{$filter_only;} == 0)
2387 0 0 $source->cardinality < $filter->cardinality ? :
2396 0 0 if (exists $lg_index->{$subtuple_ident_str})
2421 0 2 if (@{$others;} == 0)
2427 0 2 if (&any(sub { $_->is_empty; } , @{$inputs;}))
2443 0 2 if (@{$inputs;} == 0)
2447 0 2 if (@{$inputs;} == 1)
2466 0 2 if (@{$both;} == 0)
2471 0 2 if (@{$result_only;} == 0 and @{$input_only;} == 0)
2479 0 2 if (@{$result_only;} == 0)
2485 0 2 if (@{$input_only;} == 0)
2509 2 0 $topic->cardinality < $other->cardinality ? :
2517 5 2 if (exists $lg_index->{$subtuple_ident_str})
2543 0 0 if (@{$others;} == 0)
2555 0 0 if &uniqstr(@{$attr_names;}) != @{$attr_names;}
2557 0 0 if (&any(sub { $_->is_empty; } , @{$inputs;}))
2572 0 0 if (@{$inputs;} == 0)
2576 0 0 if (@{$inputs;} == 1)
2598 0 0 $topic->cardinality < $other->cardinality ? :
2631 0 0 if @{$divisor_only;} > 0
2635 0 0 if ($dividend->is_empty or $divisor->is_empty)
2642 0 0 if ($dividend->is_nullary or $divisor->is_nullary)
2669 0 0 if ($topic->is_empty or $other->is_empty)
2676 0 0 if ($topic->is_nullary)
2680 0 0 if ($other->is_nullary)
2687 0 0 if (@{$both;} == 0)
2691 0 0 if (@{$topic_only;} == 0 and @{$other_only;} == 0)
2698 0 0 if (@{$topic_only;} == 0)
2704 0 0 if (@{$other_only;} == 0)
2737 5 0 unless (exists $indexes->{$subheading_ident_str})
2769 0 0 if exists $primary_h->{$group_attr}
2794 0 0 if exists $topic_h->{$name}
2803 0 0 if ($topic->is_empty)
2848 0 0 if exists $topic_h->{$name}
2858 0 0 if ($topic->is_empty)
2884 0 0 if (defined $order_by and not ref $order_by)
2887 0 0 if ref $order_by ne "ARRAY"
2894 0 0 @{$_;} == 2 ? :
0 0 @{$_;} == 1 ? :
0 0 ref $_ ne 'ARRAY' ? :
2902 0 0 if ref $_ eq "ARRAY" and @{$_;} == 3 and defined $_->[0] and not ref $_->[0]
2906 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;})
2912 0 0 if &uniqstr(@{$atnms;}) != @{$atnms;}
2918 0 0 if ¬all(sub { exists $topic_h->{$_}; } , @{$atnms;})
2934 0 0 $is_reverse_order ? :
2942 0 0 if (my $err = $@)
2959 0 0 if $max_rank < $min_rank
2962 0 0 if ($topic->is_empty)
3011 0 0 if $max_rank < $min_rank
3015 0 0 if ($topic->is_empty)
3064 0 0 if @{$subst_only;} > 0
3075 0 0 if ($topic->is_empty)
3078 0 0 if (@{$attrs;} == 0)
3098 0 0 unless (exists $result_b->{$result_t_ident_str})
3119 0 0 if ref $attrs ne "HASH"
3126 0 0 if @{$subst_only;} > 0
3128 0 0 if $topic->_tuple_arg_has_circular_refs($attrs)
3139 0 0 if ($topic->is_empty)
3142 0 0 if (scalar CORE::keys %{$attrs;} == 0)
3156 0 0 unless (exists $result_b->{$result_t_ident_str})
3265 0 0 if exists $primary_h->{$group_attr}
3317 0 0 if ref $filler ne "HASH"
3320 0 0 if $primary->_tuple_arg_has_circular_refs($filler)
3329 0 0 unless $primary->_is_identical_hkeys($exten_h, $filler)
3392 0 0 if $topic->_has_frozen_identity
3403 0 0 if $r->_has_frozen_identity
3407 0 0 if $r->_self_is_component_of_tuple_arg($tuple)
3425 13 0 unless (exists $r_b->{$tuple_ident_str})
3437 0 0 if (exists $r_keys->{$subheading_ident_str})
3438 0 0 if (CORE::keys %{$matched_b;} == 1) { }
3461 0 0 if $r->_has_frozen_identity
3465 0 0 if $r->_self_is_component_of_tuple_arg($tuple)
3482 0 0 if (exists $r_b->{$tuple_ident_str})
3493 0 0 if (scalar CORE::keys %{$matched_b;} == 0)