Branch Coverage

blib/lib/Class/AutoClass.pm
Criterion Covered Total %
branch 146 182 80.2


line true false branch
23 320 289 unless $class->DECLARED
27 20 589 unless (@$classes)
33 100 509 if (ref $self_or_class) { }
36 78 431 $can_new ? :
42 0 609 if ($args->defaults)
46 0 0 unless exists $args->{$keyword}
60 1889 54 if $init_self
63 3 1940 if $self->{'__OVERRIDE__'}
68 1 608 if ($self->{'__NULLIFY__'}) { }
96 282 97 unless exists $args->{$fixed_func}
106 153 525 if $cattributes{$fixed_func}
114 104 421 if exists $args->{$fixed_func}
116 3 418 if $real and exists $$args{$fixed_attributes{$real}}
119 4 414 if $syn_list and grep {exists $$args{$fixed_attributes{$_}};} @$syn_list
125 13 401 if (ref $value)
127 9 4 unless $@
135 411 1226 if (exists $args->{$fixed_func})
176 42 0 if $func
186 2942 0 $func ? :
189 209 10 wantarray ? :
199 0 13 unless ref $attributes eq 'ARRAY'
203 4 32 unless exists $args->{$func} and $class->can($func)
254 187 71 unless exists $defaults->{$fixed_func}
306 76 1706 if (@_) { }
317 1226 556 wantarray ? :
324 76 609 @_ ? :
325 609 76 wantarray ? :
332 85 472 @_ ? :
333 0 557 wantarray ? :
341 84 1698 @_ ? :
342 1226 556 wantarray ? :
351 84 1637 @_ ? :
352 1165 556 wantarray ? :
359 80 1033 @_ ? :
360 556 557 wantarray ? :
367 84 1698 @_ ? :
368 1226 556 wantarray ? :
383 81 476 @_ ? :
384 0 557 wantarray ? :
391 80 2258 @_ ? :
392 1782 556 wantarray ? :
401 556 2 unless ${$class . '::DEFAULTS_ARGS';}
408 556 1782 @_ ? :
409 0 2338 wantarray ? :
416 0 881 @_ ? :
430 556 609 @_ ? :
437 556 609 @_ ? :
450 634 1313 @_ ? :
456 2 556 if @_
463 158 401 unless $class
467 0 559 if (defined $case) { }
485 201 698 if $super eq 'Class::AutoClass'
503 3 695 unless (%{$super . '::';})
504 0 3 unless eval "require $super"
515 80 618 unless (DECLARED($super))
516 78 2 if ($is_runtime) { }
517 0 78 if (UNIVERSAL::isa($super, 'Class::AutoClass')) { }
532 0 559 if (%autodb)
535 0 0 unless (grep /^Class::AutoDB::Object/, @{$class . '::ISA';})
551 0 559 if (UNIVERSAL::isa($class, 'Class::AutoDB::Object'))
555 0 0 if scalar keys %autodb == 1 and not +(keys %autodb)[0]
562 2 557 if $defer
565 279 617 if $super eq 'Class::AutoClass' or not UNIVERSAL::isa($super, 'Class::AutoClass')
589 296 0 unless $iattributes_recursive{$_} or $cattributes{$_}
594 0 0 if $cattributes{$syn} and $iattributes{$syn}
595 0 93 if $cattributes{$real} or $cattributes_recursive{$real}
596 93 0 if $iattributes{$real} or $iattributes_recursive{$real}
607 1 556 if (my(@inconsistents) = grep({exists $cattributes_recursive{$_};} keys %iattributes_recursive))
679 221 7 if $iattributes{$_}
681 107 228 if $cattributes{$_}
688 54 117 @_ > 1 ? :
70 96 @_ > 1 ? :
121 127 @_ > 1 ? :
28 72 @_ > 1 ? :
695 62 143 @_ > 1 ? :
39 123 @_ > 1 ? :
722 0 93 if $func eq $old_func
730 0 556 if (defined $case and $case =~ /lower|lc/i)
735 0 0 if $lc_func eq $func
743 0 556 if (defined $case and $case =~ /upper|uc/i)
748 0 0 if $uc_func eq $func
766 2 0 unless DECLARED($subclass)
783 0 2567 if $types->{$class} eq 'pending'
784 436 2131 if defined $types->{$class}
793 834 1991 if $super eq $Class::AutoClass::AUTOCLASS
795 1082 909 unless $type eq 'internal'
797 1698 433 if (not FORCE_NEW($class) || $$can_new and $type eq 'internal')
799 2321 78 unless $types->{$super} eq 'external'
800 78 0 if $super->can('new')
803 1876 255 if $type eq 'internal'
809 0 0 unless @_ % 2