Branch Coverage

blib/lib/Basset/Object.pm
Criterion Covered Total %
branch 242 270 89.6


line true false branch
216 43 197 if (ref $record eq 'ARRAY') { }
220 42 1 unless *{$pkg . "::$internal_attribute";}{'CODE'}
222 42 1 unless *{$pkg . "::$attribute";}{'CODE'}
226 193 4 unless *{$pkg . "::$record";}{'CODE'}
245 38 1507 unless ref $self
247 797 710 if @_
277 19 4 if (@_) { }
279 10 9 if defined $val and not $val =~ /$regex/
297 1 2 unless $caller[0] eq $self->pkg
559 1 52 if *{$pkg . "::$method";}{'CODE'}
565 65 206 if @_
571 3 49 unless my $conf = $pkg->conf
574 1 48 if (exists $$conf{$pkg}{$method}) { }
13 35 elsif (@_) { }
702 1 248 if *{$internalpkg . "::$method";}{'CODE'}
711 161 1988 unless ($$initialized{$class})
714 0 161 if (defined(my $confval = $$local_conf{$method}))
719 517 1632 if (@_)
720 56 461 if ($class ne $internalpkg)
724 0 56 if (ref $val eq 'HASH' and ref $attr eq 'HASH')
738 100 1993 if (ref $attr eq 'HASH' and $class ne $internalpkg)
749 8 240 if (defined(my $confval = $$conf{$internalpkg}{$method})) { }
143 97 elsif (@_) { }
849 1 22 if *{$pkg . "::$method";}{'CODE'}
857 0 169 unless my $conf = $pkg->conf
859 3 166 if @_
920 3 5 if ($type eq 'instance') { }
2 3 elsif ($type eq 'class') { }
2 1 elsif ($type eq 'both') { }
994 16 12 if ($type eq 'both')
997 8 4 if ($type eq 'instance') { }
3 1 elsif ($type eq 'class') { }
1127 1 14 unless my $type = shift()
1128 1 13 unless my $method = shift()
1129 1 12 unless my $wrapper = shift()
1132 1 11 unless $class->can($method)
1135 1 10 if $class->is_attribute($method, 'both')
1145 9 1 if (*{$class . "::$method";}{'CODE'}) { }
1155 1 1 if (*{$parent . "::$method";}{'CODE'})
1166 1 9 unless $class->can($wrapper) or ref $wrapper eq 'CODE'
1169 7 2 if ($type eq 'before') { }
1 1 elsif ($type eq 'after') { }
1174 23 1 if ($self->$conditional(@_))
1175 0 23 unless $self->$wrapper($ptr, @_)
1186 0 6 unless my $rc = $self->$ptr(@_)
1188 6 0 $self->$conditional(@_) ? :
1667 91 271 ref $self ? :
1668 91 271 ref $self ? :
1672 3 359 unless ($self->can($errormethod) and $self->can($codemethod))
1673 2 1 if (@_) { }
1680 152 207 if (@_) { }
1683 144 8 @_ ? :
1685 146 6 if (defined $self->$errormethod)
1691 136 10 unless ($silently)
1692 135 1 if (defined $center and $center->can('postNotification'))
1701 146 0 if ($self->can('exceptions') or $throw_anyway) { }
1702 5 141 if ($self->exceptions and defined $self->$codemethod)
1716 16 191 if (defined $err and ref $err eq 'ARRAY')
1718 14 2 if (@$err > 1) { }
1773 4 11 ref $self ? :
1813 70 184 ref $self ? :
1857 10 3 if (defined $self->error) { }
1 2 elsif (defined $self->errcode) { }
1859 8 2 defined $self->errcode ? :
2017 6 7 if $self->use_real_errors
2023 2 5 if (ref $rawerror) { }
2030 3 4 if (defined $self->errortranslator and defined $self->error and exists $self->errortranslator->{$self->error}) { }
1 3 elsif (defined $self->errortranslator and defined $error and exists $self->errortranslator->{$error}) { }
1 2 elsif (defined $self->errortranslator and defined $self->errcode and exists $self->errortranslator->{$self->errcode}) { }
1 1 elsif (defined $self->errortranslator and exists $self->errortranslator->{'*'}) { }
2046 2 5 if (ref $rawerror) { }
2100 5 0 if $self->can('exceptions')
2241 4 0 if (defined $center and $center->can('postNotification'))
2317 0 5 unless my(%newrestrictions) = @_
2327 0 5 if ($restrictions) { }
2452 11 0 if (defined $restriction_set) { }
2455 3 8 unless $restricted_method = $$map{$method}
2467 0 8 if (ref $restricted_method eq 'CODE')
2482 6 14 if (defined $code)
2588 0 190 unless my $newclass = shift()
2592 8 182 unless $inlined{$newclass} or $INC{$class->module_for_class($newclass)}
2594 3 187 if ($@)
2595 1 2 $errorless ? :
2680 0 3 unless my(@restrictions) = @_
2684 0 3 if defined $$prior{$key}
2700 1 2 unless $$pkgrestrictions{$restriction}
2708 0 3 unless $class->add_restricted_method($restriction, $method)
2767 5 4 unless $parent->restricted
2810 9 8 @_ ? :
3082 1 82 unless my $conf = $self->conf
3088 1 81 if (ref $_[0] eq 'HASH')
3112 416 3 if ($self->can($method))
3116 1 1 defined $self->error ? :
2 414 unless defined $return or not defined $value
3180 3 3120 if (index($class, '::') == 0) { }
4 3116 elsif (index($class, 'main::') == 0) { }
3243 4 0 if ($init{'type'}) { }
3248 0 4 unless my $typeClass = $class->pkg_for_type($abstype)
3388 147 42 @_ ? :
3394 187 2 if (defined $pkg) { }
3396 3 184 unless $class->load_pkg($pkg, $errorless)
3401 1 1 $errorless ? :
3621 138 0 $_[0]->can('pkg') ? :
3625 0 138 if $$seen{$class}++
3627 99 39 if defined $$paths{$class}
3636 1 35 if $$seen{$super}
3679 1 193 unless my $pkg = shift()
3714 0 706 unless my $conf = $self->_conf_class->read_conf_file
3717 118 588 if ($local and defined $$conf{$self}) { }
40 548 elsif ($local) { }
4073 1 19 unless my $methods = $args{'methods'}
4074 1 18 unless my $values = $args{'values'}
4075 16 2 unless $args{'dereference'}
4078 1 17 unless ref $methods eq 'ARRAY'
4079 1 16 unless ref $values eq 'ARRAY'
4081 2 14 unless @$methods == @$values
4095 2 15 if (ref $value eq 'ARRAY' and $$deref{$method}) { }
0 30 elsif (ref $value eq 'HASH' and $$deref{$method}) { }
4101 15 2 if ($self->can($method)) { }
4102 3 12 unless (defined $self->$method(@args))
4103 1 2 if ($args{'continue'}) { }
4107 0 2 defined $value ? :
4116 1 9 if (@errors) { }
4168 2 0 if $] >= 5.006
4173 14 8 defined $caller[$_] ? :
4240 1 55 unless my $method = shift()
4243 1 54 index($method, $prefix) >= 0 ? :
4274 1 2 unless my $method = shift()
4278 1 1 if (index($method, $prefix) == 0)
4312 1 2 unless my $method = shift()
4350 1 4 unless ref $self
4352 2 2 unless my $class = shift()
4357 2 0 if ($should_copy) { }
4358 0 2 unless $cast = $self->copy
4363 0 2 unless $self->load_pkg($class)