Branch Coverage

blib/lib/Simple/Accessor.pm
Criterion Covered Total %
branch 32 48 66.6


line true false branch
145 3 4 unless defined $INFO
146 7 0 unless defined $INFO->{$from}
158 0 7 unless $class
166 1 1 unless $INFO->{$class}{'with'}
170 0 2 unless eval "require $module; 1"
185 0 7 unless $class
200 0 11 if ($self->can('_before_build'))
205 4 18 if ($self->can($init))
206 0 4 unless $self->$init(%opts)
210 0 11 if ($self->can('_after_build'))
222 0 9 unless my $class = $opts{'to'}
224 0 9 unless @attributes
231 0 16 if $class->can($att)
237 15 30 if (defined $v) { }
12 18 elsif (not defined $self->{$att}) { }
239 14 44 if ($_ eq 'set')
244 4 40 if ($self->can($sub)) { }
0 40 elsif ($from_role) { }
245 1 3 unless $self->$sub($v)
247 0 0 if (my $code = $from_role->can($sub))
248 0 0 unless &$code($self, $v)
258 4 15 if ($self->can($sub)) { }
2 13 elsif ($from_role) { }
261 2 0 if (my $code = $from_role->can($sub))