Branch Coverage

blib/lib/Data/iRealPro/Song.pm
Criterion Covered Total %
branch 118 176 67.0


line true false branch
43 15 10 if $args{'data'}
52 15 0 $self->{'variant'} eq 'irealpro' ? :
0 15 unless (@a == ($self->{'variant'} eq 'irealpro' ? 10 : 6))
58 15 0 if ($self->{'variant'} eq 'irealpro') { }
0 0 elsif ($self->{'variant'} eq 'irealbook') { }
78 0 0 if $self->{'key'} eq 'n'
83 13 2 if ($self->{'actual_key'} eq '') { }
91 0 15 unless (!!($self->{'variant'} eq 'irealpro') == !!($tokstring =~ /^1r34LbKcu7/))
99 15 0 if ($self->{'variant'} eq 'irealpro')
101 0 15 if $self->{'debug'}
108 15 0 unless $self->{'debug'}
115 9 2 unless $self->{'tokens'}
121 1 0 unless $self->{'cells'}
222 0 598 if $self->{'debug'}
235 12 618 if (/^\{/p) { }
15 603 elsif (/^\}/p) { }
10 593 elsif (/^\[/p) { }
14 579 elsif (/^\]/p) { }
12 567 elsif (/^\*([ABCDvi])/p) { }
9 558 elsif (/^T(\d)(\d)/p) { }
8 550 elsif (/^([sl])/p) { }
218 332 elsif (/^$p_chord(?:\($p_chord\))?/p) { }
0 332 elsif (/^$p_root/p) { }
0 332 elsif (/^\($p_chord\)/p) { }
0 332 elsif (/^n/p) { }
0 332 elsif (/^x/p) { }
0 332 elsif (/^r/p) { }
147 185 elsif (/^ +/p) { }
118 67 elsif (/^\|/p) { }
11 56 elsif (/^N(\d)/p) { }
16 40 elsif (/^,/p) { }
4 36 elsif (/^Z/p) { }
0 36 elsif (/^U/p) { }
0 36 elsif (/^p/p) { }
4 32 elsif (/^Q/p) { }
4 28 elsif (/^f/p) { }
4 24 elsif (/^S/p) { }
0 24 elsif (/^Y/p) { }
4 20 elsif (/^\240+/p) { }
4 16 elsif (/^\<(?:\*(\d\d))?(.*?)\>/ps) { }
16 0 elsif (/^([\r\n]+)/p) { }
0 0 elsif (/^(.)/ps) { }
254 4 4 $1 eq 's' ? :
258 0 218 if ($t =~ /^(.+)Z$/) { }
340 0 10 if $self->{'raw'}
342 2 8 if $dataxp ne $self->{'data'}
365 0 75 if $chordsize
375 29 0 if (@$cells >= 2 and $cells->[-2]->vs == $cells->[-1]->vs)
388 1 117 if ($t eq 'start section')
393 3 114 if ($t eq 'start repeat')
398 3 111 if ($t eq 'end repeat')
399 3 0 if @$cells >= 2
404 1 110 if ($t =~ m[time (\d+)/(\d+)])
409 1 109 if ($t =~ /^hspace\s+(\d+)$/)
415 0 109 if ($t eq 'vspace')
417 0 0 if @$cells >= 1
422 1 108 if ($t eq 'end')
423 1 0 if @$cells >= 2
428 2 106 if ($t eq 'end section')
429 2 0 if @$cells >= 2
434 29 77 if ($t eq 'bar')
439 3 74 if ($t =~ /^(segno|coda|fermata)$/)
444 33 41 if ($t =~ /^chord\s+(.*)$/)
447 0 33 if ($c =~ s/\((.+)\)//)
448 0 0 if ($c) { }
452 0 0 if @$cells >= 2
463 2 39 if ($t =~ /^alternative\s+(\d)$/)
467 0 41 if ($t eq 'small')
472 0 41 if ($t eq 'large')
477 3 38 if ($t =~ /^mark (.)/)
482 0 38 if ($t eq 'stop')
487 1 37 if ($t =~ /^text\s+(\d+)\s(.*)/)
492 35 2 if ($t =~ /^advance\s+(\d+)$/)
497 0 2 if ($t =~ /^measure repeat (single|double)$/)
498 0 0 $1 eq 'single' ? :
504 0 2 if ($t =~ /^slash repeat$/)
524 215 8 unless my $xp = $self->{'transpose'} + $self->{'_transpose'}
526 0 8 unless $c =~ / ^ ( [CF](?:\#)? | [DG](?:\#|b)? | A(?:\#|b)? | E(?:b)? | B(?:b)? ) (.*) /x
537 0 8 if ($rest =~ m[^(.*)/(.*)])
541 0 8 if $r =~ s/b$//
542 0 8 if $r =~ s/\#$//
543 0 8 unless $r = $notes{$r}
545 4 4 $self->{'transpose'} > 0 ? :
570 0 9 unless $$_sigs{"$time_d$time_n"}
600 0 0 if ($v eq 'irealbook') { }
613 0 0 if ($args{'html'} or $args{'uriencode'} or not defined $args{'uriencode'})
624 0 16 unless defined $t
659 0 87 if (length $string < 2)