Branch Coverage

blib/lib/MooX/Enumeration.pm
Criterion Covered Total %
branch 47 62 75.8


line true false branch
27 1 11 if ($INC{'Moo/Role.pm'} and 'Moo::Role'->is_role($target)) { }
11 0 elsif ($Moo::MAKERS{$target} and $Moo::MAKERS{$target}{'is_class'}) { }
39 0 12 unless ref $orig
42 0 13 if (@_ % 2 == 0)
47 13 0 unless ref $attrs
50 12 1 if (delete $spec{'moox_enumeration_process_handles'})
66 0 13 if (exists $spec{'isa'} and exists $spec{'enum'}) { }
1 12 elsif (&blessed($spec{'isa'}) and $spec{'isa'}->isa('Type::Tiny::Enum')) { }
11 1 elsif (exists $spec{'enum'}) { }
73 0 11 unless ref $spec{'enum'} eq 'ARRAY'
84 12 0 if (my $handles = $spec{'handles'})
88 5 7 if (not ref $handles and $handles eq 1) { }
1 12 elsif (not ref $handles and $handles eq 2) { }
95 1 11 if (ref $handles eq 'ARRAY')
96 0 3 ref $_ ? :
99 12 0 if (ref $handles eq 'HASH')
101 32 5 if ref $handles->{$k}
110 0 12 if (ref $spec{'moosify'} eq 'CODE')
118 1 0 if $spec->{'_orig_handles'}
147 2 26 if ($INC{'Moo/Role.pm'} and 'Moo::Role'->is_role($target)) { }
26 0 elsif ($Moo::MAKERS{$target} and $Moo::MAKERS{$target}{'is_class'}) { }
168 21 7 $MAKER->is_simple_get($attr, $spec) ? :
172 1 27 if (ref $match) { }
26 1 elsif ($spec->{'isa'}->check($match)) { }
207 0 9 unless $spec->{'isa'}->check($newvalue) or not $spec->{'isa'}
212 6 3 $MAKER->is_simple_get($attr, $spec) ? :
225 0 1 unless delete $MAKER->{'captures'}
228 8 1 $MAKER->is_simple_set($attr, do { my(%temp) = %$spec; delete $temp{'coerce'}; delete $temp{'isa'}; \%temp }) ? :
233 3 6 if (ref $match) { }
3 3 elsif (defined $match) { }
253 0 3 unless $spec->{'isa'}->check($match)