Branch Coverage

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


line true false branch
27 56817 3 if @args % 2 == 1
32 4 56816 unless defined $name
38 52526 4290 unless exists $options{'init_arg'}
39 482 56334 if (exists $options{'builder'}) { }
43 6 476 if ref $options{'builder'} or not defined $options{'builder'}
47 2 474 if exists $options{'default'}
54 11833 44501 if exists $options{'default'} and ref $options{'default'}
57 1 56799 if ($options{'required'} and not defined $options{'builder'} || defined $options{'init_arg'} || exists $options{'default'})
69 412 54082 if $class ne "Class::MOP::Attribute"
72 54082 0 @_ == 1 ? :
90 19472 34610 exists $options->{'default'} ? :
127 90612 72601 if (defined $init_arg and exists $params->{$init_arg}) { }
38863 33738 elsif (exists $self->{'default'}) { }
9 33729 elsif (defined(my $builder = $self->{'builder'})) { }
142 8 1 if ($builder = $instance->can($builder)) { }
162 132776 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 56784 unless &blessed($class) and $class->isa("Class::MOP::Class")
377 255 107967 unless $self->definition_context
379 31507 76715 if (ref $accessor) { }
380 2 31505 unless ref $accessor eq "HASH"
434 45625 62592 if ($name ne $self->name)
446 17022 69112 if $self->has_accessor
450 68058 18076 if $self->has_reader
454 3260 82872 if $self->has_writer
458 19337 66795 if $self->has_predicate
462 542 85588 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