Branch Coverage

blib/lib/Hades/Realm/Exporter.pm
Criterion Covered Total %
branch 175 236 74.1


line true false branch
8 27 2 scalar @_ == 1 ? :
16 3 26 defined $args{$accessor} ? :
17 0 27 unless (not $accessors{$accessor}{'required'} or defined $value)
26 32 13 if (defined $value)
27 4 28 if ((ref $value || '') ne 'HASH')
37 2 8 if ((ref $mg || '') =~ /^(|HASH|ARRAY|SCALAR|CODE|GLOB)$/)
38 2 0 defined $mg ? :
42 2 6 if ((ref $class || '') ne 'HASH')
43 2 0 defined $class ? :
47 2 4 defined $export ? :
48 2 4 if ((ref $export || '') ne 'HASH')
49 2 0 defined $export ? :
54 1 3 if ($class->{'CURRENT'}{'BASE'} or $class->{'CURRENT'}{'PARENT'})
56 0 1 unless $class->{'CURRENT'}{'BASE'}
57 1 0 unless $class->{'CURRENT'}{'PARENT'}
60 1 0 if ($self->export->{$cls}) { }
81 2 6 if ((ref $mg || '') =~ /^(|HASH|ARRAY|SCALAR|CODE|GLOB)$/)
82 2 0 defined $mg ? :
86 2 4 if ((ref $meta || '') ne 'HASH')
87 2 0 defined $meta ? :
91 0 4 defined $our ? :
97 25 0 if ($meta->{$_}{'meta'} =~ /^(ACCESSOR|METHOD)$/)
98 22 3 if ($1 eq 'ACCESSOR')
100 9 13 if $meta->{$_}{'default'}
107 3 22 if $meta->{$_}{'predicate'}
110 6 19 if $meta->{$_}{'clearer'}
117 0 4 if ($class{'CURRENT'}{'BEGIN'}) { }
129 2 10 if (not defined $begin or ref $begin)
130 2 0 defined $begin ? :
134 2 8 if ((ref $mg || '') =~ /^(|HASH|ARRAY|SCALAR|CODE|GLOB)$/)
135 2 0 defined $mg ? :
139 2 6 if ((ref $export || '') ne 'HASH')
140 2 0 defined $export ? :
144 2 4 if ((ref $meta || '') ne 'HASH')
145 2 0 defined $meta ? :
169 2 42 if (not defined $name or ref $name)
170 2 0 defined $name ? :
174 2 40 if (not defined $type or ref $type)
175 2 0 defined $type ? :
179 2 38 if ((ref $export || '') ne 'HASH')
180 2 0 defined $export ? :
184 23 15 if (defined $now)
185 2 21 if (ref $now or not $now =~ /^[-+\d]\d*$/)
190 2 34 if (not defined $import or (ref $import || '') ne 'ARRAY')
191 2 0 defined $import ? :
198 20 14 if $now
209 2 4 if ((ref $mg || '') =~ /^(|HASH|ARRAY|SCALAR|CODE|GLOB)$/)
210 2 0 defined $mg ? :
235 25 0 wantarray ? :
257 2 28 if (not defined $name or ref $name)
258 2 0 defined $name ? :
262 2 26 if (not defined $private or ref $private)
263 2 0 defined $private ? :
267 2 24 if (not defined $type or ref $type)
268 2 0 defined $type ? :
272 2 22 if (not defined $trigger or ref $trigger)
273 2 0 defined $trigger ? :
303 22 0 unless $params[2]{$params[1]}{'pod'}
305 22 0 unless $params[2]{$params[1]}{'example'}
307 0 22 wantarray ? :
322 0 13 $name =~ /^(begin|unitcheck|check|init|end|new)$/ ? :
331 2 22 if (not defined $name or ref $name)
332 2 0 defined $name ? :
336 2 20 if (not defined $params or ref $params)
337 2 0 defined $params ? :
341 2 18 if (not defined $subtype or ref $subtype)
342 2 0 defined $subtype ? :
346 2 16 if (not defined $code or ref $code)
347 2 0 defined $code ? :
353 2 14 if $params
375 0 3 wantarray ? :
380 2 10 if ((ref $mg || '') =~ /^(|HASH|ARRAY|SCALAR|CODE|GLOB)$/)
381 2 0 defined $mg ? :
385 2 8 if (not defined $name or ref $name)
386 2 0 defined $name ? :
390 2 6 if ((ref $meta || '') ne 'HASH')
391 2 0 defined $meta ? :
412 2 7 if ((ref $mg || '') =~ /^(|HASH|ARRAY|SCALAR|CODE|GLOB)$/)
413 2 0 defined $mg ? :
417 2 5 if (not defined $name or ref $name)
418 2 0 defined $name ? :
422 2 3 if ((ref $meta || '') ne 'HASH')
423 2 0 defined $meta ? :
441 3 0 $meta->{$name}{'required'} || $meta->{$name}{'default'} ? :
449 2 28 if (not defined $name or ref $name)
450 2 0 defined $name ? :
454 2 26 if (not defined $param or ref $param)
455 2 0 defined $param ? :
459 2 24 if (defined $code)
460 2 0 if (ref $code)
467 0 0 $code =~ /^\w+$/ ? :
0 24 defined $code ? :
477 2 26 if (not defined $name or ref $name)
478 2 0 defined $name ? :
482 2 24 if (not defined $param or ref $param)
483 2 0 defined $param ? :
487 2 22 if (defined $code)
488 2 0 if (ref $code)
495 0 0 $code =~ /^\w+$/ ? :
0 0 $code =~ /^1$/ ? :
0 22 defined $code ? :
506 2 59 if (not defined $name or ref $name)
507 2 0 defined $name ? :
511 2 57 if ((ref $meta || '') ne 'HASH')
512 2 0 defined $meta ? :
516 30 27 if (defined $mod)
517 2 28 if (ref $mod)
522 30 25 if (defined $class)
523 2 28 if ((ref $class || '') ne 'HASH')
530 28 25 if ($class)
532 25 3 if ($meta->{'meta'} eq 'ACCESSOR') { }
3 0 elsif ($meta->{'meta'} eq 'METHOD') { }
542 4 21 $meta->{'private'} ? :
544 12 6 unless $meta->{'required'} or $meta->{'default'}
549 18 3 if (scalar @test_cases > 1)
553 18 0 unless ($meta->{'coerce'})
572 0 3 $meta->{'private'} ? :
601 2 51 if $meta->{'test'}