Branch Coverage

blib/lib/Music/Canon.pm
Criterion Covered Total %
branch 99 134 73.8


line true false branch
145 0 19 exists $$param{'pitchstyle'} ? :
151 19 0 unless $self->has_modal_scale_in
153 19 0 if not $self->has_modal_scale_out
164 2 4 ref $_[0] eq 'ARRAY' ? :
166 0 85 if (not defined $e) { }
0 85 elsif (blessed $e and $e->can('pitch')) { }
85 0 elsif (looks_like_number $e) { }
181 6 79 if (not defined $prev_out) { }
183 0 6 unless (looks_like_number $trans)
191 63 16 if $self->get_contrary
198 4 2 if $self->get_retrograde
229 18 23 if ($self->has_modal_in)
234 18 23 if ($self->has_modal_out)
253 0 41 ref $_[0] eq 'ARRAY' ? :
255 0 271 if (not defined $obj) { }
0 271 elsif (blessed $obj and $obj->can('pitch')) { }
271 0 elsif (looks_like_number $obj) { }
270 4 267 if (defined $prev_in and $pitch == $prev_in) { }
277 23 244 unless defined $input_tonic
284 23 244 unless defined $output_tonic
286 41 226 unless (defined $trans)
288 1 40 unless (looks_like_number $trans)
295 3 38 if ($trans != 0)
306 0 3 if ($rotate_chrome != 0)
317 3 0 if ($rotate_by != 0)
331 114 153 if defined $prev_in and $pitch - $prev_in < 0
332 227 40 $self->get_contrary ? :
344 227 40 if $self->get_contrary
352 234 33 if ($steps)
356 707 388 if $is_dsc
362 85 182 if ($chromatic_offset != 0)
364 0 85 $step_interval < 0 ? :
367 17 68 if ($chromatic_offset >= $step_interval) { }
381 63 5 if ($step_interval == 2) { }
389 1 4 if ($self->get_modal_chrome > 0) { }
1 3 elsif ($self->get_modal_chrome < 0) { }
402 250 17 unless ($hooked)
403 169 81 if $is_dsc
414 24 17 if $self->get_retrograde
430 17 0 if (defined $input_pitch)
437 0 17 if (not defined $output_pitch and $self->has_modal_out)
441 17 0 if (defined $output_pitch)
460 0 0 unless (defined $asc or defined $dsc)
466 22 0 if (defined $asc)
467 15 7 if (ref $asc eq 'ARRAY') { }
3 4 elsif ($asc =~ /($FORTE_NUMBER_RE)/) { }
470 0 65 unless looks_like_number $n and $n =~ /^[+]?[0-9]+$/
478 0 3 unless defined $pset
482 0 4 unless is_scale($asc)
486 4 0 unless defined $dsc
492 4 0 if (@dsc_nums)
502 20 2 if (not defined $dsc) { }
506 16 4 unless $is_scale
508 1 1 if (ref $dsc eq 'ARRAY') { }
1 0 elsif ($dsc =~ /($FORTE_NUMBER_RE)/) { }
510 0 6 unless looks_like_number $n and $n =~ /^[+]?[0-9]+$/
518 0 1 unless defined $pset
522 0 0 unless is_scale($dsc)
535 20 2 unless ($self->non_octave_scales)
538 0 40 if $sum == 0
539 25 15 if ($sum < $self->DEG_IN_SCALE) { }
0 15 elsif ($sum > $self->DEG_IN_SCALE) { }
553 0 272 unless looks_like_number $from
554 0 272 unless looks_like_number $to
555 0 272 if not defined $scale or ref $scale ne 'ARRAY'
560 80 192 $delta < 0 ? :
568 414 691 if $dir == $DSC