Condition Coverage

lib/Badger/Class.pm
Criterion Covered Total %
condition 42 75 56.0


and 3 conditions

line !l l&&!r l&&r condition
391 6723 0 0 &DEBUG() and $value
580 1384 0 0 defined ${$pkg . "::" . "VERSION";} and ${$pkg . "::" . "VERSION";}
641 0 1 637 @_ && ref $_[0] eq 'HASH'
685 0 638 75 @_ && ref $_[0] eq 'HASH'
700 0 1 91 @_ && ref $_[0] eq 'HASH'
718 0 442 74 @_ && ref $_[0] eq 'HASH'
850 627 0 0 scalar grep({not /::$/;} keys %$symbols) == 1 and exists $symbols->{'import'}

or 2 conditions

line l !l condition
109 1 1501 ${$package . "::" . "BADGER_LOADED";} ||= 1
129 76 0 class($class)->hash_value('HOOKS', $key) || (return)
182 101 0 shift() || 'Badger::Class'
188 0 101 $METACLASSES->{$pkg} ||= {}
388 0 0 $pkg || 'UNDEF'
852 545 82 ${$class . "::" . "BADGER_LOADED";} ||= 1

or 3 conditions

line l !l&&r !l&&!r condition
168 1 0 0 ref $_[0] || $_[0]
204 2386 10514 0 ref $class || $class
207 7129 1471 0 $$METACLASSES{$_[0]}{$class} ||= $_[0]->new($class)
19789 240 0 @_ ? $$METACLASSES{$_[0]}{$class} ||= $_[0]->new($class) : $CLASSES->{$class} ||= $pkg->new($class)
216 2 0 0 shift() || (caller())[0]
261 0 1711 0 ref $package || $package
273 19 35 0 @_ ? $self->{'id'} = shift() : $self->{'id'} ||= do { my $pkg = $self->{'name'}; my $base = $self->base_id; if ($base eq $pkg) { $pkg = $1 if $pkg =~ /(\w+)$/; } else { $pkg =~ s/^$base:://; } ; $pkg =~ s/::/./g; lc $pkg }
333 2 42 0 ${$self->{'name'} . "::" . $name;} ||= $default
475 721 0 0 ref $self || $self
477 241 480 0 $self->{'parents'} ||= do { no strict 'refs'; _autoload($pkg); [map({class($_);} @{$pkg . "::" . "ISA";})] }
495 2377 221 0 $self->{'heritage'} ||= do { my(@pending) = $self; my(%seen, $item, @order); while (@pending) { next unless defined($item = pop @pending); unshift @order, $item; push @pending, reverse(@{$item->parents;}); } ; [reverse(grep({not $seen{$_}++;} @order))] }
706 3 0 0 $self->method($code) || croak("Invalid method specified for '${names}' alias: $code")
763 32 0 22 eval { do { $self->load } } || do { _debug("maybe_load($self) caught error: $@\n") if &DEBUG(); my $name = join('\\W+', map({quotemeta $_;} split(/::/, $self->{'name'}, 0))); _debug("checking to see if we couldn't locate $name\n") if &DEBUG(); croak($@) if $@ and not $@ =~ /^Can't locate $name.*? in \@INC/; 0 }
832 3702 2040 649 defined ${$class . "::" . "BADGER_LOADED";} or scalar grep({not /::$/;} keys %$symbols) > 1