Branch Coverage

blib/lib/Class/MOP/Attribute.pm
Criterion Covered Total %
branch 72 74 97.3


line true false branch
27 58346 3 if @args % 2 == 1
32 4 58345 unless defined $name
38 53939 4406 unless exists $options{'init_arg'}
39 484 57861 if (exists $options{'builder'}) { }
43 6 478 if ref $options{'builder'} or not defined $options{'builder'}
47 2 476 if exists $options{'default'}
54 12161 45700 if exists $options{'default'} and ref $options{'default'}
57 1 58328 if ($options{'required'} and not defined $options{'builder'} || defined $options{'init_arg'} || exists $options{'default'})
69 423 55578 if $class ne "Class::MOP::Attribute"
72 55578 0 @_ == 1 ? :
90 20017 35561 exists $options->{'default'} ? :
127 92556 74256 if (defined $init_arg and exists $params->{$init_arg}) { }
39768 34488 elsif (exists $self->{'default'}) { }
9 34479 elsif (defined(my $builder = $self->{'builder'})) { }
142 8 1 if ($builder = $instance->can($builder)) { }
162 135616 12 unless $self->has_initializer
188 211 35 unless ref $reader
198 121 0 unless ref $writer
206 107 14 if (my $reader = $self->get_read_method and $self->associated_class) { }
211 10 4 if (my $class = $self->associated_class) { }
226 83 28 if (my $writer = $self->get_write_method and $self->associated_class) { }
231 24 4 if (my $class = $self->associated_class) { }
252 4 58313 unless &blessed($class) and $class->isa("Class::MOP::Class")
377 262 110949 unless $self->definition_context
379 32347 78864 if (ref $accessor) { }
380 2 32345 unless ref $accessor eq "HASH"
434 46909 64297 if ($name ne $self->name)
446 17501 71009 if $self->has_accessor
450 69928 18582 if $self->has_reader
454 3353 85155 if $self->has_writer
458 19871 68637 if $self->has_predicate
462 555 87951 if $self->has_clearer
487 10 58 if $self->has_accessor
488 44 24 if $self->has_reader
489 2 66 if $self->has_writer
490 2 66 if $self->has_predicate
491 1 67 if $self->has_clearer