Branch Coverage

blib/lib/Hades.pm
Criterion Covered Total %
branch 206 268 76.8


line true false branch
18 11 8 scalar @_ == 1 ? :
19 19 0 unless $args{'macros'}
20 0 19 if $args{'debug'}
26 0 908 if (defined $verbose)
34 0 908 if (defined $debug)
42 0 908 if ($self->debug or $self->verbose)
46 0 0 if ($self->debug)
56 0 12 if $args->{'file'}
59 1 11 if ($args->{'realm'})
65 1 11 if $self->can("module_generate")
77 5249 125 $copy =~ /\(|\{|\[|\)|\}|\]/ ? :
78 125 0 if ($nested) { }
99 0 31 if $ident
104 17 0 if @innerline
105 17 0 if @line
108 17 31 !$nested ? :
17 1748 $first_char =~ /\}/ && do {
48 1765 $first_char =~ /\{/ ? :
157 1813 $first_char =~ /\s/ && !($ident =~ /^$/) ? :
5374 1970 $ident =~ /^((:.*\()|(\{)|(\[))/ ? :
109 1335 413 unless $first_char =~ /\s/
112 12 0 if (scalar @lines)
116 0 17 if $self->can("before_class")
125 0 66 $token->[0] =~ /^(our)$/ ? :
3 66 $token->[1] =~ s/^{|}$//g ? :
3 69 $token->[0] =~ /^(synopsis|abstract|test)$/ ? :
0 72 scalar @{$token;} == 1 ? :
8 72 !ref($token) ? :
132 15 2 if (scalar keys %{$meta;})
134 1 14 if $self->can("after_class")
140 0 12 if $self->can("before_generate")
143 0 12 if $self->can("after_generate")
153 2 15 if ($class->[0] eq "macro")
171 12 34 if $meta->{$_}{'required'}
172 17 29 if $meta->{$_}{'default'}
174 1 45 if $meta->{$_}{'builder'}
178 4 11 $class{'CURRENT'}{'PARENT'} || $class{'CURRENT'}{'BASE'} ? :
207 4 4 $token =~ /^(parent|base|require|use)$/ ? :
228 0 3 $name =~ /^(begin|unitcheck|check|init|end|new)$/ ? :
288 0 1 $2 ? :
297 1 1 if ($meta->{$name}{'params_map'})
306 5 17 unless $value =~ /^(\{|\[|\"|\'|\$|\302\243|q)|(\d+)/
309 5 17 if ($meta->{$name}{'params_map'})
351 21 41 if ($meta->{$name}{'params_map'})
360 20 0 unless $meta->{$name}{'meta'} eq "MODIFY"
374 3 69 if ($name =~ s/^\[(.*)\]$/$1/)
388 3 20 $meta->{$name}{'meta'} eq 'MODIFY' ? :
46 23 $meta->{$name}{'meta'} eq 'ACCESSOR' ? :
391 9 60 if $meta->{$name}{'predicate'}
392 12 57 if $meta->{$name}{'clearer'}
453 0 20 if $meta->{$name}{'private'}
454 20 0 if ($meta->{$name}{'param'})
456 6 20 if $params_explanation
460 5 21 if $pm->{'default'}
462 21 5 if ($pm->{'type'}) { }
463 21 0 !($pm->{'type'} =~ /^(Optional|Any|Item)/) ? :
471 21 0 !($pm->{'type'} =~ /^(Optional|Any|Item)/) ? :
495 0 91 unless defined $code
519 0 18 unless length $string
525 0 18 if $string =~ /^undef$/
532 10 0 if ($match =~ /^(.*)$PARENTHESES$/m)
534 0 10 unless $self->{'macros'}{$1}{'code'}
540 0 0 unless $self->{'macros'}{$match}{'code'}
607 1 0 if (defined $code)
608 1 0 if $code =~ /^1$/
609 1 0 $code =~ /^\w+$/ ? :
618 2 68 if (defined $code)
619 2 0 $code =~ /^\w+$/ ? :
631 1 43 if (defined $code)
632 1 0 $code =~ /^\w+$/ ? :
0 1 $code =~ /^1$/ ? :
645 7 37 if ($private)
662 129 5 if ($type)
705 0 0 if $matches[1] =~ /^[a-zA-Z]/
719 1 0 if $matches[1] =~ /^[a-zA-Z]/
742 21 0 !($matches[0] =~ /^(Optional|Any|Item)/) ? :
743 21 0 if $sub_code
746 15 6 if $matches[1] or $matches[2]
749 15 6 unless $matches[1] =~ /^$/
754 15 6 unless $matches[2] =~ /^$/
775 6 0 !($matches[1] =~ /^(Optional|Any|Item)/) ? :
776 6 0 if $sub_code
816 7 0 !($matches[1] =~ /^(Optional|Any|Item)/) ? :
817 7 0 if $key_sub_code or $value_sub_code
833 4 6 if ($match =~ /(Map|Tuple|HashRef|ArrayRef|Dict)\[/)
837 2 4 $copy =~ /\[|\[/ ? :
843 10 0 !($match =~ /^(Optional|Any|Item)/) ? :
855 6 8 if (@matches and $match =~ /(Map|Tuple|HashRef|ArrayRef|Dict)\[/)
859 17 6 $copy =~ /\[|\[/ ? :
866 10 4 !($v =~ /^(Optional|Any|Item)/) ? :
894 54 11 if ($type and not $type =~ /^(Optional|Any|Item)/)
925 2 2 if (not $macro->[-1] =~ /^{/) { }
929 0 2 if $@
930 1 1 $macro->[0] ? :
945 2 0 if ($meta->{$name}{'alias'})
987 0 0 if $matches[1] =~ /^[a-zA-Z]/
999 2 0 if $matches[1] =~ /^[a-zA-Z]/
1021 42 0 unless $matches[0] =~ /^Optional/
1031 30 12 ($matches[1] || 0) > 0 ? :
30 12 $matches[2] ? :
1047 12 0 unless $matches[1] =~ qr/^Optional/
1089 14 0 unless $matches[1] =~ /^Optional/
1104 8 12 if ($match =~ /(Map|Tuple|HashRef|ArrayRef|Dict)\[/)
1108 4 8 $copy =~ /\[|\[/ ? :
1112 0 20 $_ =~ /^Optional/ ? :
1123 112 196 $d - 1 == $_ ? :
12 112 $m++ == 0 && $d > 1 ? :
1137 12 22 if (@matches and $match =~ /(Map|Tuple|ArrayRef|Dict)\[/)
1141 34 12 $copy =~ /\[|\[/ ? :
1148 26 8 unless $v =~ /^Optional/
1159 270 410 $dict eq $_ ? :
20 270 $m++ == 0 && $d > 1 ? :
1167 4 4 unless $required
1182 46 0 unless ($meta->{$_}{'no_success_test'})
1184 41 5 $meta->{$_}{'type'}[0] ? :
1205 17 29 if ($meta->{$key}{'default'}) { }
3 26 elsif ($meta->{$key}{'required'}) { }
1206 67 17 $key ne $_ ? :
1228 21 3 $key ne $_ ? :
1235 46 303 if ($m++ == 0) { }
1236 35 11 if $d > 0
1241 11 35 $key eq $_ ? :
1249 303 2589 $key eq $_ ? :
1261 7 39 $meta->{'private'} ? :
1262 25 5 unless $meta->{'no_success_test'} or $meta->{'builder'} or $meta->{'required'} or $meta->{'default'}
1264 35 4 if (scalar @test_cases > 1)
1266 35 0 unless $meta->{'no_success_test'}
1267 35 0 unless ($meta->{'coerce'})
1272 35 0 unless $meta->{'no_success_test'}
1275 21 15 $mod ne 'new' ? :
46 23 $meta->{'meta'} eq 'ACCESSOR' ? :
36 69 $mod ? :
1278 0 23 $meta->{'private'} ? :
1299 2 103 if $meta->{'test'}