Branch Coverage

blib/lib/Hades/Realm/OO.pm
Criterion Covered Total %
branch 145 278 52.1


line true false branch
8 52 1 scalar @_ == 1 ? :
15 37 108 defined $args{$accessor} ? :
18 0 145 $accessors{$accessor}{'builder'} ? :
20 0 129 unless (not $accessors{$accessor}{'required'} or defined $value)
29 14 38 if (defined $value)
30 4 10 if (ref $value)
40 28 38 if (defined $value)
41 4 24 if ((ref $value || '') ne 'HASH')
47 0 24 if (ref $key)
51 6 18 if ((ref $val || '') ne 'HASH')
52 4 2 defined $val ? :
56 8 10 if ((ref $val->{'types'} || '') ne 'HASH')
58 4 4 defined $val->{'types'} ? :
62 6 4 if ((ref $val->{'attributes'} || '') ne 'HASH')
66 4 2 defined $val->{'attributes'} ? :
78 15 39 if (defined $value)
80 0 11 $ref ? :
4 11 if (($ref || 'SCALAR') ne 'SCALAR' or not +($ref ? $$value : $value) =~ /^(1|0)$/)
85 0 11 $ref ? :
11 0 !!($ref ? $$value : $value) ? :
99 2 0 if ((ref $mg || '') =~ /^(|HASH|ARRAY|SCALAR|CODE|GLOB)$/)
100 2 0 defined $mg ? :
167 0 0 if ($params[-1] =~ /^(role)$/i) { }
0 0 elsif ($params[-1] =~ /^(with|extends|parent|base)$/) { }
0 0 elsif ($params[2] and $params[-2] =~ /^(with|extends)$/) { }
172 0 0 if $1 =~ /parent|base/
181 0 0 wantarray ? :
186 2 4 if ((ref $mg || '') =~ /^(|HASH|ARRAY|SCALAR|CODE|GLOB)$/)
187 2 0 defined $mg ? :
191 2 2 if ((ref $meta || '') ne 'HASH')
192 2 0 defined $meta ? :
196 2 0 defined $types ? :
197 2 0 if ((ref $types || '') ne 'HASH')
198 2 0 defined $types ? :
212 0 0 if $meta->{$_}{'type'}
233 0 0 wantarray ? :
241 0 0 wantarray ? :
246 2 4 if ((ref $mg || '') =~ /^(|HASH|ARRAY|SCALAR|CODE|GLOB)$/)
247 2 0 defined $mg ? :
251 2 2 if (not defined $token or (ref $token || '') ne 'ARRAY')
252 2 0 defined $token ? :
256 2 0 if ((ref $meta || '') ne 'HASH')
257 2 0 defined $meta ? :
270 2 4 if ((ref $mg || '') =~ /^(|HASH|ARRAY|SCALAR|CODE|GLOB)$/)
271 2 0 defined $mg ? :
275 2 2 if (not defined $name or ref $name)
276 2 0 defined $name ? :
280 2 0 if ((ref $meta || '') ne 'HASH')
281 2 0 defined $meta ? :
296 0 0 $self->can("build_accessor_$_") ? :
302 0 0 $self->can('build_accessor_isa') ? :
0 0 unless $meta->{$name}{'isa'}
312 2 4 if ((ref $mg || '') =~ /^(|HASH|ARRAY|SCALAR|CODE|GLOB)$/)
313 2 0 defined $mg ? :
317 2 2 if (not defined $name or ref $name)
318 2 0 defined $name ? :
322 2 0 if ((ref $meta || '') ne 'HASH')
323 2 0 defined $meta ? :
342 2 2 if ((ref $mg || '') =~ /^(|HASH|ARRAY|SCALAR|CODE|GLOB)$/)
343 2 0 defined $mg ? :
347 2 0 if ((ref $meta || '') ne 'HASH')
348 2 0 defined $meta ? :
353 0 0 $self->is_role && $self->clear_is_role ? :
361 0 3 if (ref $type eq 'ARRAY')
365 1 2 if (not defined $type or ref $type)
366 1 0 defined $type ? :
370 2 0 if ((ref $unique || '') ne 'HASH')
371 2 0 defined $unique ? :
376 0 0 if ($type =~ s/^([^\[ ]+)\[(.*)\]$/$2/) { }
0 0 elsif ($type =~ /^\s*\w+\s*\=\>\s*/ or $type =~ /^([^,]+),\s*(.*)$/) { }
378 0 0 if $t =~ /^\w+$/
386 0 0 if (@matches and $match =~ /(Map|Tuple|ArrayRef|Dict)\[/)
390 0 0 $copy =~ /\[|\]/ ? :
395 0 0 $match =~ /\s+\w*\s*\=\>/ ? :
410 2 2 if ((ref $mg || '') =~ /^(|HASH|ARRAY|SCALAR|CODE|GLOB)$/)
411 2 0 defined $mg ? :
415 2 0 if ((ref $meta || '') ne 'HASH')
416 2 0 defined $meta ? :
425 2 2 if ((ref $mg || '') =~ /^(|HASH|ARRAY|SCALAR|CODE|GLOB)$/)
426 2 0 defined $mg ? :
430 2 0 if ((ref $meta || '') ne 'HASH')
431 2 0 defined $meta ? :
440 2 0 defined $keywords ? :
446 2 0 if (not defined $keywords or (ref $keywords || '') ne 'ARRAY')
447 2 0 defined $keywords ? :
456 2 0 if ((ref $meta || '') ne 'HASH')
457 2 0 defined $meta ? :
480 2 0 defined $keywords ? :
481 2 0 if (not defined $keywords or (ref $keywords || '') ne 'ARRAY')
482 2 0 defined $keywords ? :
491 2 0 if ((ref $meta || '') ne 'HASH')
492 2 0 defined $meta ? :
498 0 0 unless $meta->{'extends'} =~ /^["'q]/
505 2 0 defined $keywords ? :
506 2 0 if (not defined $keywords or (ref $keywords || '') ne 'ARRAY')
507 2 0 defined $keywords ? :
516 2 0 if ((ref $meta || '') ne 'HASH')
517 2 0 defined $meta ? :
522 0 0 unless $meta->{'with'} =~ /^["'q]/
529 2 0 defined $keywords ? :
530 2 0 if (not defined $keywords or (ref $keywords || '') ne 'ARRAY')
531 2 0 defined $keywords ? :
540 2 0 if ((ref $meta || '') ne 'HASH')
541 2 0 defined $meta ? :
547 0 0 unless $meta->{'requires'} =~ /^["'q]/
554 2 0 defined $keywords ? :
555 2 0 if (not defined $keywords or (ref $keywords || '') ne 'ARRAY')
556 2 0 defined $keywords ? :
565 2 0 if ((ref $meta || '') ne 'HASH')
566 2 0 defined $meta ? :
578 2 0 defined $keywords ? :
579 2 0 if (not defined $keywords or (ref $keywords || '') ne 'ARRAY')
580 2 0 defined $keywords ? :
589 2 0 if ((ref $meta || '') ne 'HASH')
590 2 0 defined $meta ? :
602 2 0 defined $keywords ? :
603 2 0 if (not defined $keywords or (ref $keywords || '') ne 'ARRAY')
604 2 0 defined $keywords ? :
613 2 0 if ((ref $meta || '') ne 'HASH')
614 2 0 defined $meta ? :
626 2 2 if (not defined $name or ref $name)
627 2 0 defined $name ? :
631 2 0 if (not defined $content or ref $content)
632 2 0 defined $content ? :
638 0 0 $content =~ /^(\w+|1)$/ ? :
651 2 2 if (not defined $name or ref $name)
652 2 0 defined $name ? :
656 2 0 if (not defined $content or ref $content)
657 2 0 defined $content ? :
662 0 0 $content =~ /^\w+$/ ? :
673 2 2 if (not defined $name or ref $name)
674 2 0 defined $name ? :
678 2 0 if (not defined $content or ref $content)
679 2 0 defined $content ? :
684 0 0 $content =~ /^\w+$/ ? :
695 2 2 if (not defined $name or ref $name)
696 2 0 defined $name ? :
700 2 0 if (not defined $content or ref $content)
701 2 0 defined $content ? :