Branch Coverage

blib/lib/MIDI/Simple.pm
Criterion Covered Total %
branch 46 252 18.2


line true false branch
297 0 16 ref $_[0] eq 'MIDI::Simple' ? :
301 0 16 unless ($note_val =~ /^\d+$/)
331 0 0 ref $_[0] eq 'MIDI::Simple' ? :
349 0 1 ref $_[0] eq 'MIDI::Simple' ? :
626 0 17 if $MIDI::Simple::Debug > 3
627 0 17 unless ref $it
629 0 27 unless length $arg
631 0 27 if ($arg =~ /^d(\d+)$/s) { }
0 27 elsif ($arg =~ /^[vV](\d+)$/s) { }
0 27 elsif ($arg eq 'rest') { }
1 26 elsif ($arg =~ /^c(\d+)$/s) { }
1 25 elsif ($arg =~ /^o(\d+)$/s) { }
0 25 elsif ($arg =~ /^n?(\d+)$/s) { }
1 24 elsif (exists $MIDI::Simple::Volume{$arg}) { }
8 16 elsif (exists $MIDI::Simple::Length{$arg}) { }
0 16 elsif ($arg =~ /^o_d(\d+)$/s) { }
0 16 elsif ($arg =~ /^o_u(\d+)$/s) { }
16 0 elsif ($arg =~ /^([A-Za-z\x80-\xFF]+)((?:_[du])?\d+)?$/s and exists $MIDI::Simple::Note{$1}) { }
634 0 0 if $1 > 127
639 0 1 if $1 > 15
642 0 1 if $1 > 10
647 0 0 if $1 > 127
662 0 0 if ${$it->{'Octave'};} < 0
663 0 0 if ${$it->{'Octave'};} > 10
667 0 0 if ${$it->{'Octave'};} < 0
668 0 0 if ${$it->{'Octave'};} > 10
677 0 16 if $MIDI::Simple::Debug
680 13 3 if (not defined $o_spec && length $o_spec) { }
0 3 elsif ($o_spec =~ /^(\d+)$/s) { }
3 0 elsif ($o_spec =~ /^_d(\d+)$/s) { }
0 0 elsif ($o_spec =~ /^_u(\d+)$/s) { }
685 0 0 if $1 > 10
688 0 3 if $octave < 0
691 0 0 if $octave > 10
706 0 0 if length $arg
709 16 1 if @new_notes
718 0 1 if $Debug
742 0 1 if (defined $p1 and $p1 eq 'MIDI::Simple' || ref $p1 eq 'MIDI::Simple') { }
746 0 0 if $MIDI::Simple::Debug
751 0 1 if $MIDI::Simple::Debug
752 0 1 if (ref $MIDI::Simple::package{$cpackage}) { }
753 0 0 if $MIDI::Simple::Debug
757 0 1 if $MIDI::Simple::Debug
767 0 1 if $MIDI::Simple::Debug
859 0 0 ref $_[0] eq 'MIDI::Simple' ? :
860 0 0 if (@_) { }
861 0 0 if ($am_method) { }
874 0 0 ref $_[0] eq 'MIDI::Simple' ? :
875 0 0 if @_
881 0 0 ref $_[0] eq 'MIDI::Simple' ? :
882 0 0 if @_
888 0 0 ref $_[0] eq 'MIDI::Simple' ? :
889 0 0 if @_
895 0 0 ref $_[0] eq 'MIDI::Simple' ? :
896 0 0 if @_
902 0 0 ref $_[0] eq 'MIDI::Simple' ? :
903 0 0 if @_
909 0 0 ref $_[0] eq 'MIDI::Simple' ? :
910 0 0 if @_
916 0 0 ref $_[0] eq 'MIDI::Simple' ? :
917 0 0 if @_
923 0 0 ref $_[0] eq 'MIDI::Simple' ? :
924 0 0 if @_
933 0 0 ref $_[0] eq 'MIDI::Simple' ? :
939 0 0 ref $_[0] eq 'MIDI::Simple' ? :
945 0 0 ref $_[0] eq 'MIDI::Simple' ? :
951 0 0 ref $_[0] eq 'MIDI::Simple' ? :
957 0 0 ref $_[0] eq 'MIDI::Simple' ? :
963 0 0 ref $_[0] eq 'MIDI::Simple' ? :
969 0 0 ref $_[0] eq 'MIDI::Simple' ? :
975 0 0 ref $_[0] eq 'MIDI::Simple' ? :
981 0 0 ref $_[0] eq 'MIDI::Simple' ? :
1128 0 3 if (ref $p[0] eq 'MIDI::Simple') { }
1224 0 0 ref $_[0] eq 'MIDI::Simple' ? :
1247 0 1 ref $_[0] eq 'MIDI::Simple' ? :
1251 0 1 unless ref $out or length $out
1253 0 1 unless $ticks
1255 0 1 unless @$score_r
1259 0 1 if (ref $out) { }
1312 0 0 if $am_cons
1317 0 0 unless ref $in or length $in
1320 0 0 ref $in ? :
1324 0 0 if (@eventful_tracks == 0) { }
0 0 elsif (@eventful_tracks > 1) { }
1340 0 0 if ($am_cons) { }
1346 0 0 if (ref $MIDI::Simple::package{$cpackage}) { }
1347 0 0 if $MIDI::Simple::Debug
1351 0 0 if $MIDI::Simple::Debug
1417 0 0 ref $_[0] eq 'MIDI::Simple' ? :
1421 0 0 if $MIDI::Simple::Debug
1423 0 0 unless @subs
1429 0 0 if $MIDI::Simple::Debug
1435 0 0 if $MIDI::Simple::Debug
1436 0 0 if ${$it->{'Time'};} > $max_time
1438 0 0 if $MIDI::Simple::Debug
1459 1 0 ref $_[0] eq 'MIDI::Simple' ? :
1462 0 1 unless @$score_r
1464 0 1 unless @$events_r
1496 0 0 ref $_[0] eq 'MIDI::Simple' ? :
1533 0 0 ref $_[0] eq 'MIDI::Simple' ? :
1536 0 0 unless ref $interval_r
1543 0 0 unless (@status)
1550 0 0 if ($a_flag) { }
1551 0 0 if ($note =~ /^\d+$/s) { }
0 0 elsif ($note =~ /^n\d+$/s) { }
1660 0 0 unless @notes
1667 0 0 if (@status) { }
1674 0 0 if ($orig_a_flag) { }
1676 0 0 if ($orig_note =~ /^\d+$/s) { }
0 0 elsif ($orig_note =~ /^n\d+$/s) { }
1736 0 0 if ($in < 0) { }
0 0 elsif ($in < 12) { }
1776 0 0 unless length $in
1777 0 0 if @ret
1778 0 0 if @ret
1834 0 0 unless length $in
1836 0 0 if ($in =~ /^([A-Za-z]+)$/s and exists $MIDI::Simple::Note{$1}) { }
0 0 elsif ($in =~ /^([A-Za-z]+)_([du])(\d+)$/s and exists $MIDI::Simple::Note{$1}) { }
1845 0 0 if $2 eq "d"
1849 0 0 unless ($note_number == -1)
1866 0 0 unless length $in
1867 0 0 if ($in =~ /^n?(\d+)$/s) { }
0 0 elsif ($in =~ /^([A-Za-z]+)(\d+)/s) { }
1871 0 0 if exists $MIDI::Simple::Note{$1}
1873 0 0 if $note_number >= 0 and $note_number < 128
1908 0 0 ref $_[0] eq 'MIDI::Simple' ? :