Branch Coverage

blib/lib/MooseX/AttributeShortcuts/Trait/Attribute.pm
Criterion Covered Total %
branch 57 74 77.0


line true false branch
113 196 121 &$_has(@_) ? :
114 144 14 unless ref &$_opt(@_)
143 16 16 $name =~ /^_/ ? :
147 112 16 unless &$_has($opt)
150 8 0 $opt_val eq '-1' ? :
8 8 $opt_val eq '1' ? :
163 5 59 if ($options->{'trigger'} and $options->{'trigger'} eq '1')
175 14 0 unless $class->meta->does_role('MooseX::SemiAffordanceAccessor::Role::Attribute')
179 0 0 $name =~ /^_/ ? :
186 14 0 $name =~ /^_/ ? :
193 50 14 unless &$_opt('is') eq 'rwp'
205 59 5 unless exists $options->{'init_arg'}
207 3 2 !($name =~ /^_/) ? :
208 3 2 !($name =~ /^_/) ? :
215 2 1 "$options->{'init_arg'}" eq -1 ? :
2 3 "$options->{'init_arg'}" eq 1 ? :
0 5 !defined($options->{'init_arg'}) ? :
224 59 5 unless &$_opt('is') eq 'lazy'
228 1 4 unless &$_has('builder') or &$_has('default')
238 0 0 unless &$_opt('lazy_build') eq 'private'
251 40 24 unless &$_has('builder')
253 3 21 if (&$_ref('builder') eq 'CODE')
260 18 6 if $options->{'builder'} eq '1'
268 63 1 unless &$_ref('isa') eq 'CODE'
281 63 1 unless &$_has('isa_instance_of')
283 0 1 if (&$_has('isa'))
300 1 63 if (&$_ref('coerce') eq 'ARRAY')
304 0 1 unless &$_has('isa')
306 0 1 if @coercions % 2
308 0 1 unless @coercions > 0
315 0 1 $options->{'original_isa'} ? :
332 1 62 if (&$_has('original_isa') and &$_opt('coerce') eq '1')
336 1 0 if ($isa_type->has_coercion)
353 61 3 unless &$_has('constraint')
356 0 3 unless &$_has('isa')
358 0 3 if &$_ref('constraint') ne 'CODE'
362 3 0 if &$_ref('constraint') eq 'CODE'