Branch Coverage

blib/lib/Music/RhythmSet/Voice.pm
Criterion Covered Total %
branch 84 84 100.0


line true false branch
29 9 2 if (exists $args->{'pattern'} and exists $args->{'ttl'})
30 2 7 if $args->{'ttl'} < 1
34 2 4 unless defined $args->{'pattern'} and ref $args->{'pattern'} eq 'ARRAY' and @{$args->{'pattern'}}
54 22 14 if ($ttl <= 0)
57 2 20 unless defined $next and ref $next eq 'CODE'
65 2 17 unless defined $param{'pattern'} and ref $param{'pattern'} eq 'ARRAY' and @{$param{'pattern'}}
66 1 16 if $ttl < 1
105 6 4 if (defined $pat)
106 2 4 unless ref $pat eq 'ARRAY' and @$pat
111 7 1 if (defined $ref)
112 1 6 unless ref $ref eq 'ARRAY'
114 1 5 unless ref $ref->[0] eq 'ARRAY'
124 2 9 unless defined $str and length $str
127 2 7 if ($param{'sep'}) { }
137 4 18 if $line =~ /^\s*(?:#|$)/u
141 14 4 if ($line =~ /^ (?\d{1,10}) $param{'sep'} (?.*?) $param{'sep'} (?[x.]{1,256}) $param{'sep'} (?\d{1,5}) \s*(?:[#].*)? $/ax) { }
168 2 7 unless defined $replay and ref $replay eq 'ARRAY' and @$replay
183 3 7 if $ttl > $maxm
186 2 8 if ($param{'time'})
191 16 10 if ($x == 1) { }
200 6 4 if $maxm <= 0
209 2 11 unless defined $replay and ref $replay eq 'ARRAY' and @$replay
229 5 6 length $id ? :
234 5 11 if $ttl > $maxm
245 20 18 if ($x == 1) { }
247 8 12 if (defined $open)
255 6 12 if (defined $open)
263 6 10 if (defined $open)
272 2 14 if ($delay and $onsets and $ttl > 1) { }
285 4 12 unless $onsets
288 9 7 if $maxm <= 0
300 3 8 if ($param{'sustain'} or $param{'notext'})
303 10 25 if ($param{'sustain'} and $events->[$i][0] eq 'note_off') { }
2 38 elsif ($param{'notext'} and $events->[$i][0] eq 'text_event') { }
309 1 11 if ($events->[$j][0] eq 'text_event' and $events->[$j][1] > 0) { }
9 2 elsif ($events->[$j][0] eq 'note_on') { }
313 4 5 if ($events->[$j][1] > 0)
320 1 2 if ++$j > $#$events
336 2 1 if $param{'notext'}
346 2 7 unless defined $replay and ref $replay eq 'ARRAY' and @$replay
363 3 9 if $ttl > $maxm
370 5 7 if $maxm <= 0