Branch Coverage

blib/lib/Sub/Accessor/Small.pm
Criterion Covered Total %
branch 76 162 46.9


line true false branch
16 8 0 eval {
19 0 8 !&HAS_SUB_UTIL() && eval {
57 24 0 ref $_[0] eq 'HASH' ? :
58 24 0 @_ % 2 ? :
62 24 0 if defined $export_opts->{'into'} and not ref $export_opts->{'into'}
64 24 0 $package ? :
96 76 44 unless defined $me->{$type}
100 1 23 if (defined $me->{'handles'})
102 1 0 if ($me->{'traits'} or $me->{'handles_via'})
110 1 0 if ($shv_data)
113 0 1 length $me->{'builder'} ? :
0 1 ref $me->{'default'} ? :
130 1 1 ref $target ? :
137 0 1 unless ($shv_data)
150 4 7 $me->{'is'} eq 'lazy' ? :
4 11 $me->{'is'} eq 'rwp' ? :
5 15 $me->{'is'} eq 'rw' ? :
4 20 $me->{'is'} eq 'ro' ? :
152 4 20 wantarray ? :
160 0 46 unless defined $target
162 3 43 if (not ref $target and $target =~ /\A[^\W0-9]\w+\z/)
173 43 0 if (ref $target eq 'SCALAR' and not defined $$target)
179 0 0 if (not ref $target and $target eq 1)
191 0 0 if (ref $me->{'handles'} eq 'ARRAY') { }
0 0 elsif (ref $me->{'handles'} eq 'HASH') { }
218 0 24 $me->{'slot'} =~ /\A_/ ? :
222 120 48 unless exists $me->{$type}
223 46 2 if ref $me->{$type}
224 2 0 if $me->{$type} ne 1
227 0 0 unless defined $me->{'slot'}
238 0 24 if (ref $me->{'builder'} eq 'CODE')
246 0 0 unless defined $name and defined $me->{'package'}
248 0 0 $name =~ /\A_/ ? :
267 0 2 if ($me->{'is'} eq 'rw') { }
0 2 elsif ($me->{'is'} eq 'ro') { }
0 2 elsif ($me->{'is'} eq 'rwp') { }
0 2 elsif ($me->{'is'} eq 'lazy') { }
270 0 0 if not exists $me->{'accessor'} and defined $name
275 0 0 if not exists $me->{'reader'} and defined $name
280 0 0 if not exists $me->{'reader'} and defined $name
282 0 0 if not exists $me->{'writer'} and defined $name
287 0 0 if not exists $me->{'reader'} and defined $name
289 0 0 unless exists $me->{'lazy'}
291 0 0 unless $me->{'builder'} or $me->{'default'}
298 19 5 unless exists $me->{'default'}
300 0 5 unless (ref $me->{'default'})
307 0 5 unless ref $me->{'default'} eq 'CODE'
314 0 24 if (my $does = $me->{'does'})
316 0 0 if &blessed($_[0])
319 0 24 if (defined $me->{'isa'} and not ref $me->{'isa'})
322 0 0 unless eval {
327 0 0 $me->{'package'} ? :
335 0 24 if (defined $me->{'trigger'} and not ref $me->{'trigger'})
346 0 24 if $me->{'initializer'}
347 0 24 if $me->{'traits'}
348 0 24 if $me->{'lazy_build'}
372 46 0 defined $me->{'slot'} ? :
465 0 0 if (ref $method eq 'ARRAY') { }
493 0 29 if ($me->{'auto_deref'})
508 5 17 if ($me->{'lazy'})
512 5 0 if ($me->{'default'}) { }
0 0 elsif (defined $me->{'builder'}) { }
570 5 4 if ($coerce eq '$_[1]')
572 5 0 unless ($me->{'trigger'} or $me->{'weak_ref'})
615 8 4 if ($coerce eq '$_[1]')
617 7 0 unless ($me->{'lazy'} or $me->{'trigger'} or $me->{'weak_ref'})
652 13 8 unless my $coercion = $me->{'coerce'}
654 8 0 unless (ref $coercion)
658 8 0 if (&blessed($type) and $type->can('coercion')) { }
0 0 elsif (&blessed($type) and $type->can('coerce')) { }
671 0 8 unless (ref $coercion)
678 8 0 if (&blessed($coercion) and $coercion->can('can_be_inlined') and $coercion->can_be_inlined and $coercion->can('inline_coercion'))
689 0 0 if (&blessed($coercion) and $coercion->can('coerce'))
703 11 10 unless my $type = $me->{'isa'}
705 10 0 if (&blessed($type) and $type->isa('Type::Tiny') and $type->can_be_inlined)
710 10 0 if ($ass =~ /\Ado \{(.+)\};\z/ms)
722 0 0 if (&blessed($type) and $type->can('can_be_inlined') and $type->can_be_inlined)
727 0 0 if ($inliner)
733 0 0 if (&blessed($type) and $type->can('check') and $type->can('get_message'))
747 9 0 unless $me->{'weak_ref'}
761 1 8 unless my $trigger = $me->{'trigger'}