Branch Coverage

blib/lib/Mouse/Meta/Attribute.pm
Criterion Covered Total %
branch 53 64 82.8


line true false branch
65 8 584 if (@bad and $class ne 'Mouse::Meta::Attribute')
76 1 591 if (@bad)
83 25 567 if ($class ne 'Mouse::Meta::Attribute')
89 0 0 unless $_[0]->has_reader
90 0 0 unless $_[0]->has_writer
92 15 19 unless $_[0]->reader
93 4 0 unless $_[0]->writer
110 12 583 if (my $metaclass = delete $args->{'metaclass'})
115 11 584 if (my $traits_ref = delete $args->{'traits'})
120 1 10 if $class->does($trait)
125 2 8 if ref $$traits_ref[$i + 1]
129 10 1 if (@traits)
145 1 0 unless $type_constraint
146 0 0 if $type_constraint->check($value)
170 4 3 if (exists $args->{$illegal} and exists $self->{$illegal})
176 226 17 unless (exists $args->{$name})
182 1 28 if @traits
186 2 252 if ($attr =~ /\A _mouse_cache_/msx)
192 1 28 if ($args->{'lazy_build'})
207 10 7 if ($accessor) { }
255 611 2334 if (exists $attribute->{$type})
271 19 570 if (exists $attribute->{'handles'})
274 15 23 if 'Mouse::Object'->can($handle)
276 2 21 if ($metaclass->has_method($handle))
300 2 17 if ($handle_type eq 'HASH') { }
8 9 elsif ($handle_type eq 'ARRAY') { }
4 5 elsif ($handle_type eq 'Regexp') { }
5 0 elsif ($handle_type eq 'CODE') { }
309 0 3 Mouse::Util::is_a_metarole($meta) ? :
325 7 2 if ($self->{'isa'}) { }
0 2 elsif ($self->{'does'}) { }
331 2 7 unless defined $meta