Branch Coverage

blib/lib/Text/Amuse/Compile/MuseHeader.pm
Criterion Covered Total %
branch 39 46 84.7


line true false branch
95 356 0 if ($hash) { }
96 0 356 unless ref $hash eq "HASH"
105 0 994 if ($k =~ /_/)
110 0 994 if (exists $lowered{$lck})
117 528 896 if (exists $lowered{$f} and defined $lowered{$f} and $lowered{$f} =~ /\w/) { }
142 22 9 if (my $lang_orig = $self->header->{'lang'}) { }
143 22 0 if ($lang_orig =~ /([a-z]{2,3})/) { }
161 31 10 if (my $slides = $self->header->{'slides'})
162 13 18 if (not $slides or $slides =~ /^\s*(no|false)\s*$/is) { }
182 59 232 if (my $cover = $self->header->{'cover'})
183 48 11 if ($cover =~ /\A ( [a-zA-Z0-9] [a-zA-Z0-9-]* [a-zA-Z0-9] \.(jpe?g|png) )\z /x)
191 47 1 if (-f $cover)
205 47 2 if ($self->cover)
206 6 41 if (my $width = $self->header->{'coverwidth'})
207 5 1 if ($width =~ /\A[01](\.[0-9][0-9]?)?\z/) { }
302 1 254 if (length $self->listtitle) { }
316 2 252 scalar @{$self->authors;} ? :
8 246 scalar @{$self->topics;} ? :
338 0 1295 unless $fields{$field}
340 22 1273 if (exists $header->{$field})
342 22 0 if (defined $string and length $string)
344 4 18 if ($field eq 'cat') { }
15 3 elsif ($string =~ /\;/) { }