Branch Coverage

blib/lib/Sub/HandlesVia/Toolkit/Moo.pm
Criterion Covered Total %
branch 60 136 44.1


line true false branch
27 3 101 if ($INC{'Moo/Role.pm'} and 'Moo::Role'->is_role($target)) { }
38 0 104 unless ref $orig
41 0 124 if (@_ % 2 == 0)
46 4 120 unless $spec{'handles'}
47 0 120 ref $attrs ? :
51 120 0 if $shv
60 120 0 if (ref $attrname)
61 0 120 unless @$attrname == 1
67 3 117 unless ($ctor_maker)
74 117 0 $spec->{'isa'} ? :
75 6 111 exists $spec->{'coerce'} ? :
76 0 117 if ((ref $coerce || '') eq "CODE")
91 1703 93 $gen ? :
93 1796 0 unless delete $maker->{'captures'}
98 308 24 $gen ? :
105 128 204 unless delete $maker->{'captures'}
107 93 24 $maker->is_simple_get($attrname, $spec) ? :
111 0 0 $gen ? :
113 0 0 unless delete $maker->{'captures'}
118 509 117 $gen ? :
120 346 280 unless delete $maker->{'captures'}
123 0 117 $maker->is_simple_set($attrname, $spec) ? :
130 90 27 if (exists $spec->{'default'}) { }
8 19 elsif (exists $spec->{'builder'}) { }
137 47 70 if (is_CodeRef($default->[1]))
157 0 19 unless my($gen, $handler) = @_
158 0 19 if (not $default and $handler) { }
4 15 elsif ($default->[0] eq 'builder') { }
5 10 elsif ($default->[0] eq 'default' and is_CodeRef($default->[1])) { }
0 10 elsif ($default->[0] eq 'default' and is_Undef($default->[1])) { }
10 0 elsif ($default->[0] eq 'default' and is_Str($default->[1])) { }
189 0 3 if (ref $attrname)
190 0 0 unless @$attrname == 1
201 3 0 if ($spec->{'is'} eq 'ro') { }
0 0 elsif ($spec->{'is'} eq 'rw') { }
0 0 elsif ($spec->{'is'} eq 'rwp') { }
212 3 0 if (exists $spec->{'reader'})
215 0 3 if (exists $spec->{'writer'})
218 0 3 if (exists $spec->{'accessor'})
219 0 0 unless defined $reader_name
220 0 0 unless defined $writer_name
223 3 0 $spec->{'isa'} ? :
225 0 3 if ((ref $coerce || '') eq "CODE")
233 3 0 if (defined $reader_name) { }
236 0 3 $reader_name =~ /^[\W0-9]\w*$/s ? :
240 0 0 if ($spec->is_Coderef->{'default'}) { }
0 0 elsif (exists $spec->{'default'}) { }
0 0 elsif (is_CodeRef($spec->{'builder'}) or ($spec->{'builder'} || 0) eq 1) { }
0 0 elsif ($spec->{'builder'}) { }
258 0 0 unless (exists $instance->{$attrname})
259 0 0 $default_literal ? :
268 0 3 if (defined $writer_name) { }
271 0 0 $writer_name =~ /^[\W0-9]\w*$/s ? :
275 0 3 if (($spec->{'trigger'} || 0) eq 1)
281 0 0 if ($type)
282 0 0 $type->has_coercion && $coerce ? :
286 0 0 if ($trigger)
287 0 0 exists $instance->{$attrname} ? :
290 0 0 if ($weaken and ref $new_value)
300 1 2 if (exists $spec->{'default'}) { }
2 0 elsif (exists $spec->{'builder'}) { }
307 1 2 if (is_CodeRef($default->[1]))
327 0 0 unless my($gen, $handler) = @_
328 0 0 if (not $default and $handler) { }
0 0 elsif ($default->[0] eq 'builder') { }
0 0 elsif ($default->[0] eq 'default' and is_CodeRef($default->[1])) { }
0 0 elsif ($default->[0] eq 'default' and is_Undef($default->[1])) { }
0 0 elsif ($default->[0] eq 'default' and is_Str($default->[1])) { }