Branch Coverage

blib/lib/Class/Root.pm
Criterion Covered Total %
branch 202 306 66.0


line true false branch
51 10 1 unless defined &main::CT_CHECKS
52 9 2 unless defined &main::RT_CHECKS
53 11 0 unless defined &main::LOCAL_SUBS
71 0 0 $flags & &$_ ? :
158 0 565 if $verbose
171 2 364 if (/^([+-])(.*)/) { }
172 2 0 $1 eq '+' ? :
177 2 0 if ($k eq 'DEFINE_LOCAL_SUBS' and $v and not $old_v)
194 0 182 unless (defined $hr)
198 1 181 unless (ref $hr eq 'declare')
204 0 182 unless ref $hr eq 'declare'
207 0 182 unless ($name_str =~ /([:_?*!~]*)([a-zA-Z]\w*)$/)
217 53 129 unless $flags & MF
228 53 129 if ($flags & AF)
231 0 53 if (defined $oro)
232 0 0 if $oro
233 0 0 unless $oro
244 12 170 if $flags & (RO | PROT)
246 17 165 if ($flags & PRIV)
252 3 179 if ($flags & SETOPTS)
257 37 142 if (exists $$opts{'value'})
258 22 15 $flags & CF ? :
263 129 50 if $flags & MF
265 50 129 if ($flags & AF)
271 3 173 if (exists $$opts{'check_value'})
277 8 156 if ($flags & RO)
295 0 3 unless defined $mhr
297 0 3 if $$mhr{'FLAGS'} & RO
299 0 3 if $$mhr{'FLAGS'} & MF
305 2 1 if (defined $value)
306 2 0 $$mhr{'FLAGS'} & CF ? :
312 2 1 if (defined $$opts{'check_value'})
334 75 5 if (@_)
338 10 65 if ($setopts) { }
343 4 6 if (@_)
345 3 1 if (method_name_ok($arg0))
355 10 0 if ($name =~ /^setopt(ion)?s$/) { }
357 0 10 unless ref $val eq 'HASH'
364 0 12 unless exists $known_options{$key}
377 3 62 if (ref $arg0 eq 'declare') { }
0 62 elsif (ref $arg0 eq 'HASH') { }
385 0 62 unless method_name_ok($arg0)
389 60 2 if (@_)
394 28 32 if (ref $arg1 eq 'declare') { }
406 70 10 unless ($setopts)
465 0 3 unless $str
467 0 3 unless ($str =~ /^([_:?*]*)([a-zA-Z]\w*)$/)
499 411 3 unless (exists $$csubs{$name})
506 0 3 $o ? :
507 0 3 $o ? :
520 3 0 $class eq $nparent ? :
522 0 3 if ($ncf != $ocf)
524 0 0 $ncf ? :
525 0 0 $ocf ? :
531 0 3 if ($class ne $nparent and $oparent ne $nparent)
532 0 0 unless ($name =~ /^(init|class_init|DESTROY)$/)
538 0 3 if ($class eq $nparent and not $nflags & OVER and not $oflags & VIRT)
542 1 2 if ($nflags & AF and $nflags & OVER)
546 0 2 if $osub eq $nsub
568 17 8 if (@_ and $_[0] eq 'isa')
575 22 3 unless (exists $$schema{$caller})
584 5 0 if (/^([+-])(.*)/) { }
585 5 0 $1 eq '+' ? :
592 8 17 unless ($isa_arg)
594 5 3 if ($$copts{'DEFINE_LOCAL_SUBS'})
598 0 7 if (my $local_import = $caller_local->can('import')) { }
614 613 4 if (($status = filter_read()) > 0)
618 30 583 if (/^\s*package\s+([\w:]+)\s*;/)
619 13 17 unless $1 eq $caller_local
626 613 0 if ($filter_prefix)
627 24 589 if s/((-\>\s*)_(?=[A-Za-z]))/$2$filter_prefix/g
631 12 601 if s/(-\>\s*_)_/$1/g
638 0 30 if ($changed and $verbose || $verbose_sf)
663 17 0 unless ($import_done{$caller})
704 15 2 unless (defined &$caller_class_init)
705 8 7 if (@_ or $$cschema{'NUMBER_OF_PARENTS'} > 1 or $$cschema{'HAVE_CLASS_ATTR_VALUES'})
741 17 0 unless (defined &$caller_init)
742 6 11 if ($$cschema{'NUMBER_OF_PARENTS'} > 1 or $$cschema{'HAVE_INSTANCE_ATTR_VALUES'})
751 17 0 unless (defined &$caller_destroy)
752 0 17 if ($$cschema{'NUMBER_OF_PARENTS'} > 1)
787 0 8 if $err
807 0 221 if $err
814 16 205 if $flags & PRIV or exists $$cschema{'LOCAL_SUBS'}{$m}
836 16 102 if $caller ne $class and $priv
840 34 68 if (defined $prototype and $prototype eq '')
841 0 34 if $priv
842 0 34 if ($priv)
851 5 29 if (defined $default_class and $flags & CF)
854 2 3 if ($flags & RO and not $priv) { }
876 13 21 if (defined &$caller_f) { }
877 1 12 unless \&$caller_f eq $lfsub
904 0 187 unless ($name =~ /^[a-zA-Z]\w*$/)
908 0 186 unless ($virt or defined $sub)
912 0 187 if ($virt and defined $sub)
921 2 185 if (not $over and $code = $class->can($name))
922 2 0 unless ($$csubs{$name}{'FLAGS'} & VIRT)
923 2 0 defined $$csubs{$name} ? :
926 0 2 if ($$csubs{$name}{'FLAGS'} & PRIV)
934 0 185 if ($over and not $class->can($name))
939 1 184 if ($virt)
946 8 177 if ($flags & PROT)
954 180 5 unless (exists $$subs{$sub})
964 1 184 if $err
979 24 160 if ($name eq 'class_init' or $name eq 'init' or $name eq 'DESTROY') { }
989 16 168 if ($$schema{$class}{'CT_OPTS'}{'DEFINE_LOCAL_SUBS'})
996 8 8 if ($priv)
1003 15 1 if (defined $prototype and $prototype eq '')
1008 7 8 if ($cf)
1010 2 5 $ro && !$priv ? :
1059 4 4 if $err
1066 8 5 if defined $sub
1105 8 49 if ($ro and not $priv) { }
1111 2 13 if (@_)
1112 2 0 $cf ? :
1117 2 0 if @_
1120 8 5 $cf ? :
1125 8 0 unless $sub
1133 11 117 if ($$schema{$class}{'SUBS'}{$name}{'TIED'})
1139 81 37 $cf ? :
1141 56 62 if @_
1144 43 7 unless $sub
1159 10 0 $cf ? :
1161 2 8 if (@_)
1189 0 0 if ($key and /^_/)
1226 6 0 if (@_ and $_[0] =~ /^CALLER=(.*)/)
1231 0 6 unless (defined $caller)
1248 0 0 if $key
1262 0 6 if $$self{$base_init_done_key}{$parent}
1264 6 0 if (my $code = $parent->can('init'))
1270 0 6 unless ($not_seen_parents)
1279 0 0 if (@_ and $_[0] =~ /^CALLER=(.*)/)
1283 0 0 unless (defined $caller)
1298 0 0 if $$self{$base_destroy_done_key}{$parent}
1300 0 0 if (my $code = $parent->can('DESTROY'))
1335 11 2 if (@_ and $_[0] =~ /^CALLER=(.*)/)
1340 2 11 unless (defined $caller)
1357 5 5 if $key
1371 0 13 if $$cdata{$base_init_done_key}{$parent}
1373 13 0 if (my $code = $parent->can('class_init'))
1379 0 13 unless ($not_seen_parents)
1397 1 289 if ($flags & VIRT and $parent ne $class)
1402 1 16 if ($err)
1420 0 0 unless defined $class
1442 0 0 if $priv and not $prot and $parent ne $class
1445 0 0 if ($priv and not $prot)
1451 0 0 if ($prot)
1454 0 0 unless $m =~ /^$prefix/
1458 0 0 if ($flags & VIRT)
1462 0 0 if ($flags & RO and not $priv)
1467 0 0 if $flags & AF
1468 0 0 if $flags & CF and $flags & AF
1469 0 0 if $flags & MF
1470 0 0 if $flags & CF and $flags & MF