Branch Coverage

blib/lib/PerlBean.pm
Criterion Covered Total %
branch 255 372 68.5


line true false branch
1035 27 0 defined $_[0] ? :
1038 0 27 unless ref $opt eq 'HASH'
1041 0 27 if (exists $$opt{'_export_tag_'}) { }
1042 0 0 unless ref $$opt{'_export_tag_'} eq 'ARRAY'
1050 0 27 exists $$opt{'_finalized_'} ? :
1053 0 27 exists $$opt{'_has_exports_'} ? :
1056 23 4 if exists $$opt{'abstract'}
1059 1 26 exists $$opt{'autoloaded'} ? :
1062 15 12 if (exists $$opt{'base'}) { }
1063 0 15 unless ref $$opt{'base'} eq 'ARRAY'
1071 23 4 if exists $$opt{'collection'}
1074 0 27 if (exists $$opt{'dependency'}) { }
1075 0 0 unless ref $$opt{'dependency'} eq 'ARRAY'
1102 23 4 if exists $$opt{'description'}
1105 0 27 exists $$opt{'exception_class'} ? :
1108 0 27 if (exists $$opt{'export_tag_description'}) { }
1109 0 0 unless ref $$opt{'export_tag_description'} eq 'ARRAY'
1117 0 27 if exists $$opt{'license'}
1120 0 27 if (exists $$opt{'method'}) { }
1121 0 0 unless ref $$opt{'method'} eq 'ARRAY'
1129 0 27 if (exists $$opt{'method_factory'}) { }
1130 0 0 unless ref $$opt{'method_factory'} eq 'ARRAY'
1138 0 27 unless exists $$opt{'package'}
1142 23 4 exists $$opt{'short_description'} ? :
1145 1 26 exists $$opt{'singleton'} ? :
1148 0 27 if (exists $$opt{'symbol'}) { }
1149 0 0 unless ref $$opt{'symbol'} eq 'ARRAY'
1157 20 7 if exists $$opt{'synopsis'}
1160 23 4 exists $$opt{'use_perl_version'} ? :
1167 162 528 if ($a =~ /^[a-z]/ and not $b =~ /^[a-z]/) { }
168 360 elsif (not $a =~ /^[a-z]/ and $b =~ /^[a-z]/) { }
1232 0 38 unless $method_factory->isa('PerlBean::Attribute')
1243 9 29 if $constraints
1250 18 9 unless $constraints
1255 18 9 unless $constraints
1264 0 74 unless $method_factory->isa('PerlBean::Attribute')
1283 0 74 unless $method_factory->isa('PerlBean::Attribute')
1302 0 74 unless $method_factory->isa('PerlBean::Attribute')
1321 0 74 unless $method_factory->isa('PerlBean::Attribute')
1338 1 26 unless $self->is_autoloaded
1341 1 26 unless $self->is_autoloaded
1344 0 26 if $self->exists_dependency('AutoLoader')
1358 0 0 if $self->exists_method('new') and $self->exists_method('_initialize')
1367 0 92 unless $method_factory->isa('PerlBean::Attribute')
1389 27 0 unless $self->exists_method('new')
1393 27 0 unless $self->exists_method('_initialize')
1413 8 0 if (not $do_implement and defined $self->get_collection and scalar $self->get_base)
1423 8 19 unless $do_implement
1443 7 12 if (scalar $self->get_base == 1) { }
0 12 elsif (scalar $self->get_base) { }
1487 15 0 if (not $do_implement and defined $self->get_collection and scalar $self->get_base)
1507 1 26 !$do_opt_hash_ref ? :
1513 1 26 if (not $do_opt_hash_ref) { }
1518 15 11 if ($mand)
1529 18 8 if (scalar keys %{$own_attr;})
1551 18 29 if $pkg_name eq $self->get_package
1597 0 27 if $self->exists_symbol('%DEFAULT_VALUE')
1607 0 92 unless $method_factory->isa('PerlBean::Attribute')
1615 19 8 unless $has_default_value
1633 26 1 unless $self->is__has_exports_
1637 26 1 unless $self->is__has_exports_
1649 1 9 unless $self->exists__export_tag_($tag)
1657 1 0 unless ($self->exists_symbol('%EXPORT_TAGS'))
1671 6 10 unless $sym->exists_export_tag($tag)
1706 7 10 unless $sym->values_export_tag
1712 10 0 unless $sym->exists_export_tag('default')
1726 1 0 unless $self->exists_symbol('@EXPORT_OK')
1735 1 0 if not $self->exists_symbol('@EXPORT')
1753 0 307 if $self->exists_method($meth->get_method_name)
1764 26 1 unless $self->is_singleton
1767 1 0 unless $self->exists_symbol('$SINGLETON')
1776 0 1 if $self->exists_method('instance')
1820 1 26 if $self->is__has_exports_
1821 16 11 if (scalar @base)
1835 0 27 if $self->exists_symbol('$VERSION') or $self->exists_symbol('($VERSION)')
1861 0 61 if exists $$loop_stop{$pkg}
1867 0 206 unless $method_factory->isa('PerlBean::Attribute')
1870 0 206 if exists $$done{$method_factory->get_method_factory_name}
1882 0 34 unless defined $super_bean
1896 0 61 if exists $$loop_stop{$pkg}
1901 220 962 if exists $$eff_meth{$meth->get_method_name}
1906 2 59 unless defined $self->get_collection
1914 0 34 unless defined $super_bean
1928 0 24 if exists $$loop_stop{$pkg}
1933 0 24 if (defined $found_attr)
1941 0 0 if $match_attr_ref eq $found_attr_ref
1955 0 8 unless defined $super_bean
1961 0 8 if defined $attr_over
1975 0 485 if exists $$loop_stop{$pkg}
1980 198 287 if defined $found_meth
1988 0 66 unless defined $super_bean
1994 0 66 if defined $found_meth
2008 0 6 if ($sym->get_symbol_name eq '%EXPORT_TAGS' or $sym->get_symbol_name eq '@EXPORT_OK' or $sym->get_symbol_name eq '@EXPORT')
2015 1 5 if (scalar $sym->values_export_tag)
2031 9 18 unless $has_attributes
2033 9 9 !$constraints ? :
2088 198 43 unless $dependency->is_volatile
2098 288 372 unless $method->is_volatile
2108 30 75 unless $symbol->is_volatile
2133 133 0 unless (exists $ALLOW_ISA{$name} or exists $ALLOW_REF{$name} or exists $ALLOW_RX{$name} or exists $ALLOW_VALUE{$name})
2141 889 85 if (ref $val and exists $ALLOW_ISA{$name})
2143 889 0 if &UNIVERSAL::isa($val, $class)
2148 0 85 if (ref $val and exists $ALLOW_REF{$name})
2149 0 0 if exists $ALLOW_REF{$name}{ref $val}
2153 85 0 if (defined $val and not ref $val and exists $ALLOW_RX{$name})
2155 85 0 if $val =~ /$rx/
2160 0 0 if (not ref $val and exists $ALLOW_VALUE{$name})
2161 0 0 if exists $ALLOW_VALUE{$name}{$val}
2187 27 487 if $do_constructors
2191 0 27 unless ($do_constructors)
2207 934 28 unless $method->isa('PerlBean::Method::Constructor')
2242 1 141 unless $dep->isa('PerlBean::Dependency::Use')
2252 141 1 unless $dep->isa('PerlBean::Dependency::Require')
2262 142 0 unless $dep->isa('PerlBean::Dependency::Import')
2275 26 1 unless $self->is__has_exports_
2279 1 0 unless ($self->exists_export_tag_description('default'))
2287 1 0 if ($self->exists_export_tag_description($tag)) { }
2302 10 10 unless $sym->exists_export_tag($tag)
2321 23 4 defined $self->get_description ? :
2324 20 7 defined $self->get_synopsis ? :
2327 23 4 defined $self->get_abstract ? :
2352 25 2 if (defined $self->get_collection)
2355 25 508 if $pkg eq $self->get_package
2360 25 0 $also ? :
2364 0 27 if (defined $self->get_license) { }
23 6 elsif (defined $self->get_collection and defined $self->get_collection->get_license) { }
2406 26 1 if $self->is_autoloaded
2426 27 5 if $do_methods
2430 0 27 unless ($do_methods)
2446 28 934 if $method->isa('PerlBean::Method::Constructor')
2470 1 26 unless $self->is_autoloaded
2492 0 1 unless &_value_is_allowed('_export_tag_', @value)
2514 0 142 unless &_value_is_allowed('dependency', @_)
2526 0 1 unless &_value_is_allowed('export_tag_description', @_)
2538 0 516 unless &_value_is_allowed('method', @_)
2551 0 92 unless &_value_is_allowed('method_factory', @_)
2564 0 90 unless &_value_is_allowed('symbol', @_)
2601 28 43 unless exists $$self{'PerlBean'}{'dependency'}{$val}
2627 0 372 unless exists $$self{'PerlBean'}{'method'}{$val}
2653 150 75 unless exists $$self{'PerlBean'}{'symbol'}{$val}
2756 0 1333 if (scalar @_) { }
2820 50 4 if ($$self{'PerlBean'}{'_finalized_'}) { }
2831 4 104 if ($$self{'PerlBean'}{'_has_exports_'}) { }
2842 104 4 if ($$self{'PerlBean'}{'autoloaded'}) { }
2853 1 26 if ($$self{'PerlBean'}{'singleton'}) { }
2948 0 28 unless &_value_is_allowed('_export_tag_', @value)
2962 27 54 if (shift()) { }
2973 1 53 if (shift()) { }
2986 0 23 unless &_value_is_allowed('abstract', $val)
3005 26 1 if (shift()) { }
3017 0 27 unless &_value_is_allowed('base', @_)
3025 0 15 if exists $$self{'PerlBean'}{'base'}{'HASH'}{$val}
3036 0 48 unless &_value_is_allowed('collection', $val)
3046 0 27 unless &_value_is_allowed('dependency', @_)
3062 0 23 unless &_value_is_allowed('description', $val)
3073 0 27 unless defined $val
3076 0 27 unless &_value_is_allowed('exception_class', $val)
3086 0 27 unless &_value_is_allowed('export_tag_description', @_)
3112 0 27 unless &_value_is_allowed('method', @_)
3128 0 27 unless &_value_is_allowed('method_factory', @_)
3145 0 27 unless defined $val
3148 0 27 unless &_value_is_allowed('package', $val)
3159 0 27 unless &_value_is_allowed('short_description', $val)
3168 1 26 if (shift()) { }
3180 0 27 unless &_value_is_allowed('symbol', @_)
3196 0 20 unless &_value_is_allowed('synopsis', $val)
3207 0 27 unless defined $val
3210 0 27 unless &_value_is_allowed('use_perl_version', $val)
3242 10 0 if (scalar @_) { }
3245 10 0 if exists $$self{'PerlBean'}{'_export_tag_'}{$key}
3268 426 54 if (scalar @_) { }
3271 426 0 if exists $$self{'PerlBean'}{'dependency'}{$key}
3284 1 0 if (scalar @_) { }
3287 1 0 if exists $$self{'PerlBean'}{'export_tag_description'}{$key}
3300 1544 115 if (scalar @_) { }
3303 1249 295 if exists $$self{'PerlBean'}{'method'}{$key}
3316 412 142 if (scalar @_) { }
3319 388 24 if exists $$self{'PerlBean'}{'method_factory'}{$key}
3332 143 82 if (scalar @_) { }
3335 143 0 if exists $$self{'PerlBean'}{'symbol'}{$key}
3351 2 25 unless $self->is__finalized_
3387 488 28 unless $method->isa('PerlBean::Method::Constructor')
3393 19 8 if scalar $self->values_method('_initialize')
3398 19 497 if $name eq '_initialize'
3400 28 469 if $method->isa('PerlBean::Method::Constructor')
3409 2 25 unless $was_finalized