Branch Coverage

lib/ChordPro/Output/PDF/Writer.pm
Criterion Covered Total %
branch 58 194 29.9


line true false branch
33 0 8 if $regtest
53 8 0 if ($self->{'pdf'}->can('info_metadata')) { }
66 0 8 $regtest ? :
83 0 0 unless defined $s
85 0 0 if ($s =~ /\S/)
99 684 360 if (not defined $col or $col =~ /^foreground(?:-medium|-light)?$/) { }
0 360 elsif ($col eq 'background') { }
0 360 elsif (not $col) { }
113 732 0 if (not defined $col or $col eq 'background') { }
0 0 elsif ($col =~ /^foreground(?:-medium|-light)?$/) { }
0 0 elsif (not $col) { }
129 0 1243 if (/\x{266f}/)
130 0 0 unless ($font->{'has_sharp'} //= $font->{'fd'}{'font'}->glyphByUni(9839) ne ".notdef")
135 0 1243 if (/\x{266d}/)
136 0 0 unless ($font->{'has_flat'} //= $font->{'fd'}{'font'}->glyphByUni(9837) ne ".notdef")
157 0 684 if ($nomarkup) { }
175 684 0 if $bgcol and $bgcol =~ /^no(?:ne)?$/i
176 0 684 $ENV{'CHORDPRO_DEBUG_TEXT'} ? :
178 0 684 if $frame and $frame =~ /^no(?:ne)?$/i
179 0 684 if ($bgcol or $frame)
180 0 0 if $debug
183 0 0 $debug ? :
184 0 0 if $frame
202 0 682 unless $size ||= $font->{'size'}
276 0 0 if $strokecolor
277 0 0 if $fillcolor
281 0 0 if $fillcolor and not $strokecolor
282 0 0 if $fillcolor and $strokecolor
283 0 0 if $strokecolor and not $fillcolor
289 0 0 unless $lw
292 0 0 if $strokecolor
293 0 0 if $fillcolor
298 0 0 if $fillcolor and not $strokecolor
299 0 0 if $fillcolor and $strokecolor
300 0 0 if $strokecolor and not $fillcolor
308 48 0 if $strokecolor
309 0 48 if $fillcolor
312 0 48 if $fillcolor
313 48 0 if $strokecolor
321 48 0 if $strokecolor
326 48 0 if $strokecolor
329 48 0 if $strokecolor
337 0 0 if $strokecolor
341 0 0 if $strokecolor
344 0 0 if $strokecolor
353 0 0 if $main::config->{'debug'}{'images'}
354 0 0 if ($uri =~ /^id=(.+)/)
357 0 0 if ($a->{'type'} eq 'abc') { }
0 0 elsif ($a->{'type'} eq 'jpg') { }
0 0 elsif ($a->{'type'} eq 'png') { }
0 0 elsif ($a->{'type'} eq 'gif') { }
373 0 0 if /\.png$/i
374 0 0 if /\.jpe?g$/i
375 0 0 if /\.gif$/i
387 0 0 if ($border)
402 10 57 if $page == $self->{'pdf'}->pages + 1
410 0 67 unless ($ps->{'theme'}{'background'} =~ /^white|none|#ffffff$/i)
433 0 0 unless $bg
434 0 0 if $pg > $bg->pages
444 0 0 unless $pdf
457 22 0 if ($c) { }
458 0 14 $style eq 'alpha' ? :
0 14 $style eq 'Alpha' ? :
8 14 $style eq 'roman' ? :
0 22 $style eq 'Roman' ? :
6 16 defined $prefix ? :
467 0 0 defined $prefix ? :
476 0 8 unless $book and @$book
485 0 16 unless @$book
493 0 16 if (@{$self->{'ps'}{'outlines'};} == 1) { }
495 0 0 if $ctl->{'collapse'}
500 0 16 if $ctl->{'collapse'}
505 16 0 if ($ctl->{'letter'} > 0)
518 0 16 if ($needlh) { }
523 0 0 unless (defined $cur_ol and $cur_let eq $let)
533 0 0 if (my $c = $ol->can('destination')) { }
549 48 0 if (my $c = $ol->can('destination')) { }
563 8 0 if ($file and $file ne '-') { }
583 0 40 if $d[-2] eq "fonts/"
585 40 40 unless $fontdir
587 40 0 if (-d $fontdir) { }
605 0 520 if (UNIVERSAL::isa($v, 'HASH')) { }
613 0 160 if @fam > 1
617 0 760 unless $self->init_font($ff)
620 0 40 if $fail
627 80 680 if ($ps->{'fonts'}{$ff}{'file'}) { }
0 680 elsif ($ps->{'fonts'}{$ff}{'description'}) { }
680 0 elsif ($ps->{'fonts'}{$ff}{'name'}) { }
636 0 760 unless $fd
650 0 0 if $regtest
653 0 0 if $font->{'fd'}->get_size
668 0 80 if $regtest
681 0 680 unless $cf
703 0 0 unless -f $file
712 0 0 if ($cname) { }
727 0 0 if ($rname) { }
745 10 0 unless $cname