Branch Coverage

blib/lib/Class/HPLOO/Base.pm
Criterion Covered Total %
branch 40 204 19.6


line true false branch
48 6 0 if $prev_pack eq 'Class::HPLOO::Base'
52 6 0 $sub0 =~ /^(.*?(?:::)?$sub)\::$sub$/ ? :
56 0 0 if $sub_is_new_hploo and $prev_pack and !ref($_[0]) && $_[0] ne $prev_pack && !UNIVERSAL::isa($_[0], $prev_pack) || ref $_[0] && !UNIVERSAL::isa($_[0], $prev_pack)
58 6 0 if (defined @{"${pack}::ISA";})
59 6 0 $sub_is_new_hploo ? :
62 3 3 if ($sub0 ne $isa_sub and not ref $_[0] and $isa_sub =~ /^(.*?(?:::)?$sub_name)\::$sub_name$/)
66 0 6 if ($sub0 eq $isa_sub and UNIVERSAL::isa($_[0], $pack))
69 0 0 if ($sub_is_new_hploo)
70 0 0 if (UNIVERSAL::isa($pk, 'Class::HPLOO::Base')) { }
78 0 0 if $isa_sub
82 6 0 if $isa_sub and defined &$isa_sub and $sub0 ne $isa_sub
85 0 0 $sub_is_new_hploo ? :
88 0 0 if "${pack}::$sub" eq $sub0
109 0 0 if $$stack{$isa_i}++
110 0 0 if $isa_i eq $class_end
114 0 0 $found ? :
0 0 if $only_stak
127 0 12 if $count > 100
132 12 0 if (UNIVERSAL::isa($pack, 'Class::HPLOO::Base')) { }
133 12 0 $sub eq 'new' ? :
139 6 6 if ($look_deep or not defined &$isa_sub)
141 0 6 if $isa_i eq $pack or $isa_i eq 'Class::HPLOO::Base'
142 0 6 if $isa_i eq 'UNIVERSAL'
144 6 0 if $isa_sub
148 0 12 unless defined &$isa_sub
159 0 1 if ref $class
166 1 3 if (defined @{"${ISA_i}::ISA";} and @{"${ISA_i}::ISA";} > 2)
169 2 2 if $ISA_i eq 'Class::HPLOO::Base'
173 0 2 if defined &$sub
174 0 2 if $ret and UNIVERSAL::isa($ret, $class)
186 0 1 if ref $class
192 1 3 if (defined @{"${ISA_i}::ISA";} and @{"${ISA_i}::ISA";} > 2)
195 2 2 if $ISA_i eq 'Class::HPLOO::Base'
198 0 2 if defined &$sub
213 0 1 ref $class ? :
216 0 1 if ref $class eq 'ARRAY'
218 0 1 if ref $class
219 0 1 if ref $class_bless
225 0 1 if (not defined &{"${class}::$class_end";} and @{"${class}::ISA";} > 1)
227 0 0 if $ISA_i eq 'Class::HPLOO::Base'
229 0 0 if (defined &$sub)
231 0 0 if $new_ref == $NEW_REF or defined &{"${ISA_i}::__CLASS__";} and defined &{"${ISA_i}::SUPER";} and defined &{"${ISA_i}::new_call_END";}
239 1 0 unless ref $this and UNIVERSAL::isa($this, $class_bless)
248 0 1 if ($$CLASS_HPLOO{'ATTR'})
250 1 0 defined &{"${class}::$class_end";} ? :
252 1 0 if (ref $ret_this and UNIVERSAL::isa($ret_this, $class_bless)) { }
0 0 elsif ($ret_this == $undef) { }
254 0 1 if ($$CLASS_HPLOO{'ATTR'} and UNIVERSAL::isa($this, 'HASH'))
270 0 0 if ($$CLASS_HPLOO{'ATTR'})
272 0 0 unless exists $$this{$Key}
311 0 0 unless $type =~ /^(?:(?:ref)|(?:ref)?(?:array|hash)(?:boolean|integer|floating|string|sub_\w+|any|&\w+)|(?:ref)?(?:array|hash)|(?:array|hash)?(?:boolean|integer|floating|string|sub_\w+|any|&\w+))$/
313 0 0 if ($type eq 'any' and $type0 =~ /^((?:ref\s*)?(?:array|hash) )?(\w+(?:(?:::|\.)\w+)*)$/)
316 0 0 if $tp2 =~ /^(?:obj|object)$/i
321 0 0 $type =~ /^(?:array|hash)/ ? :
323 0 0 unless $$CLASS_HPLOO{'ATTR'}{$name}
330 0 0 if ($type =~ /^sub_(\w+)$/) { }
338 0 0 $parse_ref ? :
357 0 0 unless defined &{"${class}::set_$name";}
365 0 0 unless defined &{"${class}::get_$name";}
377 0 0 if ($type eq 'any') { }
0 0 elsif ($type eq 'string') { }
0 0 elsif ($type eq 'boolean') { }
0 0 elsif ($type eq 'integer') { }
0 0 elsif ($type eq 'floating') { }
0 0 elsif ($type =~ /^sub_(\w+)$/) { }
0 0 elsif ($type =~ /^&(\w+)$/) { }
0 0 elsif ($type eq 'ref') { }
0 0 elsif ($type eq 'array') { }
0 0 elsif ($type eq 'hash') { }
0 0 elsif ($type eq 'refarray') { }
0 0 elsif ($type eq 'refhash') { }
0 0 elsif ($type =~ /^array(&?[\w:]+)/) { }
0 0 elsif ($type =~ /^hash(&?[\w:]+)/) { }
0 0 elsif ($type =~ /^refarray(&?[\w:]+)/) { }
0 0 elsif ($type =~ /^refhash(&?[\w:]+)/) { }
0 0 elsif ($type =~ /^\w+(?:::\w+)*$/) { }
382 0 0 if $_[0] =~ /^(?:false|null|undef)$/i
383 0 0 if $_[0]
396 0 0 unless ($val =~ /^\d+\.\d+$/)
404 0 0 if defined &$sub
408 0 0 if defined &$sub
412 0 0 if ref $val
424 0 0 if ref $val eq 'ARRAY'
428 0 0 if ref $val eq 'HASH'
433 0 0 $tp =~ /^(?:any|string|boolean|integer|floating|sub_\w+|&\w+)$/ ? :
434 0 0 if ($accept_undef) { }
438 0 0 unless CLASS_HPLOO_ATTR_TYPE($class, $tp, $_)
451 0 0 if ref $_[0] ne 'ARRAY'
458 0 0 if ref $_[0] ne 'HASH'
464 0 0 UNIVERSAL::isa($_[0], $type) ? :
480 0 0 if ($$this{'tp'} =~ /^sub_(\w+)$/)
483 0 0 unless (ref $$CLASS_HPLOO{'OBJ_TBL'})
485 0 0 if (not $@) { }
504 0 0 if ($ref_changed)
505 0 0 if (ref $$ref_changed ne 'HASH')
509 0 0 if ($$this{'pr'}) { }
510 0 0 $$this{'tp'} =~ /^ref/ ? :
522 0 0 if ($$this{'tp'} =~ /^sub_(\w+)$/) { }
526 0 0 if defined &$sub
529 0 0 if ($$this{'tp'} =~ /^(?:ref)?(?:array|hash)/)
531 0 0 if ($ref_changed)
532 0 0 if (ref $$ref_changed ne 'HASH')