Branch Coverage

blib/lib/Data/iRealPro/Song.pm
Criterion Covered Total %
branch 116 176 65.9


line true false branch
43 13 7 if $args{'data'}
52 13 0 $self->{'variant'} eq 'irealpro' ? :
0 13 unless (@a == ($self->{'variant'} eq 'irealpro' ? 10 : 6))
58 13 0 if ($self->{'variant'} eq 'irealpro') { }
0 0 elsif ($self->{'variant'} eq 'irealbook') { }
78 0 0 if $self->{'key'} eq 'n'
83 13 0 if ($self->{'actual_key'} eq '') { }
91 0 13 unless (!!($self->{'variant'} eq 'irealpro') == !!($tokstring =~ /^1r34LbKcu7/))
99 13 0 if ($self->{'variant'} eq 'irealpro')
101 0 13 if $self->{'debug'}
108 13 0 unless $self->{'debug'}
115 7 0 unless $self->{'tokens'}
121 1 0 unless $self->{'cells'}
222 0 456 if $self->{'debug'}
235 9 472 if (/^\{/p) { }
9 463 elsif (/^\}/p) { }
8 455 elsif (/^\[/p) { }
11 444 elsif (/^\]/p) { }
9 435 elsif (/^\*([ABCDvi])/p) { }
8 427 elsif (/^T(\d)(\d)/p) { }
8 419 elsif (/^([sl])/p) { }
178 241 elsif (/^$p_chord(?:\($p_chord\))?/p) { }
0 241 elsif (/^$p_root/p) { }
0 241 elsif (/^\($p_chord\)/p) { }
0 241 elsif (/^n/p) { }
0 241 elsif (/^x/p) { }
0 241 elsif (/^r/p) { }
105 136 elsif (/^ +/p) { }
87 49 elsif (/^\|/p) { }
6 43 elsif (/^N(\d)/p) { }
13 30 elsif (/^,/p) { }
3 27 elsif (/^Z/p) { }
0 27 elsif (/^U/p) { }
0 27 elsif (/^p/p) { }
3 24 elsif (/^Q/p) { }
3 21 elsif (/^f/p) { }
3 18 elsif (/^S/p) { }
0 18 elsif (/^Y/p) { }
3 15 elsif (/^\240+/p) { }
3 12 elsif (/^\<(?:\*(\d\d))?(.*?)\>/ps) { }
12 0 elsif (/^([\r\n]+)/p) { }
0 0 elsif (/^(.)/ps) { }
254 4 4 $1 eq 's' ? :
258 0 178 if ($t =~ /^(.+)Z$/) { }
340 0 8 if $self->{'raw'}
342 2 6 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 173 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 8 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 13 unless defined $t
659 0 78 if (length $string < 2)