Branch Coverage

blib/lib/Data/Object.pm
Criterion Covered Total %
branch 98 120 81.6


line true false branch
57 0 0 if shift()
64 0 4 unless $name and defined $expr
67 0 4 if 'Data::Object' eq $class
68 2 2 $name =~ /(::|')/ ? :
73 2 2 ref $expr eq 'CODE' ? :
86 0 5 unless $sub
102 0 932 if $error or $failed or not $loaded
172 11 3569 if (not defined $scalar) { }
2683 886 elsif (&blessed($scalar)) { }
178 4 2679 if $scalar->isa('Regexp')
187 136 750 if (ref $scalar) { }
188 91 45 if 'ARRAY' eq ref $scalar
189 33 12 if 'HASH' eq ref $scalar
190 12 0 if 'CODE' eq ref $scalar
195 616 134 if (&looks_like_number($scalar)) { }
196 12 604 if $scalar =~ /\./
197 574 30 if $scalar =~ /^\d+$/
223 45 419 if ($type and $type eq 'HASH')
226 31 89 ref $val ? :
230 126 338 if ($type and $type eq 'ARRAY')
233 82 418 ref $val ? :
238 3 461 wantarray ? :
244 135 1397 if $object->isa('Data::Object::Array')
245 53 1344 if $object->isa('Data::Object::Hash')
246 17 1327 if $object->isa('Data::Object::Code')
248 55 1272 if $object->isa('Data::Object::Float')
249 950 322 if $object->isa('Data::Object::Number')
250 34 288 if $object->isa('Data::Object::Integer')
252 251 37 if $object->isa('Data::Object::String')
253 3 34 if $object->isa('Data::Object::Scalar')
254 7 27 if $object->isa('Data::Object::Regexp')
256 17 10 if $object->isa('Data::Object::Undef')
257 3 7 if $object->isa('Data::Object::Universal')
266 1 1056 unless $type
269 8 1048 if $type eq 'ARRAY'
270 7 1041 if $type eq 'HASH'
271 5 1036 if $type eq 'REGEXP'
272 47 989 if $type eq 'FLOAT'
273 742 247 if $type eq 'NUMBER'
274 25 222 if $type eq 'INTEGER'
275 197 25 if $type eq 'STRING'
276 13 12 if $type eq 'UNDEF'
278 6 6 if ($type eq 'SCALAR' or $type eq 'UNIVERSAL')
281 1 5 if $type eq 'ARRAY'
282 0 5 if $type eq 'HASH'
283 0 5 if $type eq 'FLOAT'
284 0 5 if $type eq 'INTEGER'
285 0 5 if $type eq 'NUMBER'
286 0 5 if $type eq 'REGEXP'
287 5 0 if $type eq 'SCALAR'
288 0 0 if $type eq 'STRING'
289 0 0 if $type eq 'UNDEF'
291 0 0 if ($type eq 'REF')
292 0 0 if $type = &deduce_type($object = $$object)
297 6 0 if ($type eq 'CODE')
310 6 1017 if ($object and 'HASH' eq ref $object)
313 7 6 ref $val ? :
317 8 1015 if ($object and 'ARRAY' eq ref $object)
320 7 18 ref $val ? :
325 16 1007 wantarray ? :