Condition Coverage

blib/lib/Class/Contract.pm
Criterion Covered Total %
condition 49 108 45.3


and 2 conditions

line l !l condition
530 4 0 $has_pre++ and last
550 0 0 $has++ and last

and 3 conditions

line !l l&&!r l&&r condition
166 179 0 1 $current->isa('Class::Contract::attr') and $field eq 'impl'
176 70 16 93 $field eq 'impl' and not $current->isa('Class::Contract::ctor') || $current->isa('Class::Contract::dtor') || $current->isa('Class::Contract::clone')
312 16 0 0 $$parent{'use_old'} and not $$spec{'use_old'}
330 6 0 14 defined $$parent{$clause}{$name}{'impl'} and @{$$parent{$clause}{$name}{'impl'};}
355 57 0 1 $$parent{$clause}{$name}{'private'} and not $$spec{$clause}{$name}{'private'}
379 15 0 0 defined $$parent{'invar'} and @{$$parent{'invar'};}
471 48 0 0 $$method{'private'} and not $classname->isa($caller)
515 70 0 0 $$spec{'opt'} and no_opt($$spec{'owner'})
521 24 29 31 @specs and not @errors
570 0 1 0 $$attr{$attrname} and $$attr{$attrname}{'shared'}
587 0 0 0 $ref and not $ref =~ /^(HASH|ARRAY|SCALAR|GLOB|FORMAT|CODE|Regexp|REF)$/
602 0 15 0 $noctor &&= $$ctor{'shared'}
825 0 0 0 --$depth and $seen{$_[0]} = $rval

or 2 conditions

line l !l condition
311 16 0 $contract{$ancestor} || (next)

or 3 conditions

line l !l&&r !l&&!r condition
122 1 5 114 $type || $def_type{$kind}
1 5 114 $type || $def_type{$kind}
176 16 0 93 $current->isa('Class::Contract::ctor') || $current->isa('Class::Contract::dtor') || $current->isa('Class::Contract::clone')
269 0 0 0 ref $self || $self
287 0 0 0 ref $_[0] || $_[0]
320 78 0 22 defined $$spec{$clause}{$name} or exists $inherited_clause{$name}
350 0 0 58 not defined $$spec{$clause}{$name}{'impl'} or $inherited_impl{$name}
406 0 0 0 eval { do { $$attr{'type'}->new } } || croak("Unable to create $$attr{'type'} object ", "for class attribute $name")
415 2 0 1 $$attr{'shared'} or ref $_[0]
423 0 1 0 ref $self || $self
454 4 3 93 $$spec{'abstract'} ||= $$method{'abstract'}
477 0 48 0 ref $self || $self
481 48 0 0 $$method{'shared'} or ref $self
508 9 151 0 ref self || self
515 0 41 29 $$spec{'opt'} and no_opt($$spec{'owner'}) or $$spec{'code'}(@args)
575 0 0 0 eval { do { $$attr{$attrname}{'type'}->new } } || croak("Unable to create $$attr{$attrname}{'type'} ", "object for attribute $attrname")
614 3 0 20 $$spec{'abstract'} ||= $$ctor{'abstract'}
622 0 0 0 ref $self || $self
648 0 3 0 ref $proto || $proto
680 0 0 6 $$spec{'abstract'} ||= $$dtor{'abstract'}
767 3 0 20 $$spec{'abstract'} ||= $$clause{'abstract'}