Branch Coverage

blib/lib/Class/IntrospectionMethods.pm
Criterion Covered Total %
branch 189 246 76.8


line true false branch
166 49 0 if $obsolete_behavior eq 'skip'
187 168 499 unless $class->isa('Class::IntrospectionMethods') and &{$class->can('ima_method_maker');}
237 1 1 ref $_[0] ? :
243 9 3 ref $_[0] ? :
244 10 2 scalar @_ ? :
247 10 2 wantarray ? :
252 3 2 ref $_[0] ? :
254 1 4 if @_
259 0 3 ref $_[0] ? :
262 3 0 wantarray ? :
283 20 68 unless my $meta_method = shift @args
285 8 60 if ($meta_method =~ /^-?parent$/) { }
0 60 elsif ($meta_method =~ /^-?noparent$/) { }
4 56 elsif ($meta_method =~ /^-?catalog$/) { }
1 55 elsif ($meta_method =~ /^-?nocatalog$/) { }
2 53 elsif ($meta_method =~ /^-?global[_-]catalog$/i) { }
296 3 1 if ($support_legacy and not defined $legacy_catalog{$target_class})
321 0 53 unless my $arg = shift @args
323 38 15 ref $arg eq 'ARRAY' ? :
341 73 17 unless defined $catalog_name
361 670 0 if ($reftype eq 'CODE') { }
363 670 0 unless defined *{"$package$name";}{'CODE'}
671 6 14 if (@_) { }
767 0 6 unless my $list = shift @old_args
769 3 3 ref $list eq 'ARRAY' ? :
774 3 8 if (ref $obj_def eq 'HASH') { }
776 0 3 unless my $slot = delete $$obj_def{'slot'}
797 4 2 defined *{$may_be_class . '::';} ? :
806 1 12 ref $slot_item ? :
809 3 10 ref $arg0 ? :
812 0 13 defined $slot_av ? :
819 2 12 defined $c_args ? :
827 10 4 if (not defined $$self{$slot} or scalar @sub_args > 0)
831 9 0 $av ? :
1 9 ref $item && UNIVERSAL::isa($item, $type) ? :
834 6 4 if $graft and defined $obj
846 2 12 scalar @c_args ? :
861 1 1 defined $$self{$slot} ? :
911 5 1 ref $tie_args ? :
913 0 6 unless defined $tie_class
915 1 5 ref $fieldr ? :
925 3 2 if $parent_method_closure
934 4 5 unless exists $$self{$field}
936 3 6 if (@_)
951 1 2 unless exists $$self{$field}
972 7 1 scalar @c_args ? :
987 0 28 unless defined $create_hash
992 0 3 unless defined $$self{$field}
999 0 2 unless defined $$self{$field}
1014 0 2 unless defined $$self{$field}
1021 0 1 unless defined $$self{$field}
1034 0 3 unless defined $$self{$field}
1142 4 20 ref $hash eq 'ARRAY' ? :
1144 21 3 ref $args[0] ? :
1150 15 2 if (defined $x_parm)
1155 14 0 if $parent_method_closure
1163 15 0 if defined $custom_tied_obj
1165 9 6 if defined $user_tied_obj and $parent_method_closure
1174 0 6 unless defined $key
1177 0 6 if @_
1178 0 6 @_ ? :
1189 16 51 unless defined $$self{$name}
1191 1 16 wantarray ? :
17 50 unless defined $key
1194 0 50 if @_ > 1
1197 15 35 if @_
1198 15 35 @_ ? :
1204 1 6 unless defined $$self{$name}
1206 0 7 unless defined $custom_tied_obj
1210 19 9 if (defined $x_parm and defined $$x_parm{'tie_hash'})
1226 0 6 unless defined $$self{$name}
1232 2 26 if (defined $x_parm and defined $$x_parm{'tie_storage'})
1260 6 34 unless defined $x_parm
1262 24 10 if (defined $$x_parm{'class_storage'})
1265 22 2 ref $cs ? :
1267 22 2 if @args
1270 2 32 if (defined $$x_parm{'tie_storage'})
1273 2 0 ref $th ? :
1275 0 2 if scalar @args
1280 26 8 if (defined $tie_index)
1282 25 1 ref $tie_index ? :
1284 9 17 if scalar @args
1301 0 9 unless my $slot = delete $$hash{'slot'}
1304 0 9 unless $$hash{'class_storage'} = delete $$hash{'class'}
1326 0 2 unless my $tie_class = $$hash{'tie'}
1329 2 0 ref $tie_args ? :
1347 0 4 unless my $slot = delete $$hash{'slot'}
1350 2 2 if defined $$hash{'tie_scalar'}
1372 0 12 unless defined $create_array
1379 0 3 unless defined $$self{$field}
1386 1 4 unless defined $$self{$field}
1393 0 4 unless defined $$self{$field}
1400 0 4 unless defined $$self{$field}
1407 0 1 unless defined $$self{$field}
1414 0 2 unless defined $$self{$field}
1421 0 2 unless defined $$self{$field}
1428 1 0 unless defined $$self{$field}
1436 1 40 unless defined $$self{$field}
1438 40 1 if @_ == 1
1439 1 0 wantarray ? :
1446 1 3 if @args % 2
1448 0 3 unless defined $$self{$field}
1567 2 8 ref $hash eq 'ARRAY' ? :
1569 7 3 ref $args[0] ? :
1575 9 2 if (defined $x_parm)
1580 7 17 if $parent_method_closure
1589 9 0 if defined $custom_tied_obj
1591 3 6 if defined $user_tied_obj and $parent_method_closure
1600 0 0 unless defined $key
1603 0 0 if @_
1604 0 0 @_ ? :
1615 8 22 unless defined $$self{$name}
1617 6 24 if @_
1618 6 24 wantarray ? :
1624 0 1 unless defined $$self{$name}
1626 0 1 unless defined $custom_tied_obj
1630 7 5 if (defined $x_parm and defined $$x_parm{'tie_array'})
1646 0 0 unless defined $$self{$name}
1652 0 12 if (defined $x_parm and defined $$x_parm{'tie_storage'})
1704 1 1 ref $item ? :
0 2 unless my $slot = ref $item ? delete $$item{'slot'} : $item
1707 1 1 ref $item ? :
1726 0 2 unless my $slot = delete $$h{'slot'}