Branch Coverage

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


line true false branch
146 0 19 exists $param->{'pitchstyle'} ? :
152 19 0 unless $self->has_modal_scale_in
154 19 0 if not $self->has_modal_scale_out
165 2 4 ref $_[0] eq 'ARRAY' ? :
167 0 85 if (not defined $e) { }
0 85 elsif (&blessed($e) and $e->can('pitch')) { }
85 0 elsif (&looks_like_number($e)) { }
182 6 79 if (not defined $prev_out) { }
184 0 6 unless (&looks_like_number($trans))
192 63 16 if $self->get_contrary
199 4 2 if $self->get_retrograde
230 18 23 if ($self->has_modal_in)
235 18 23 if ($self->has_modal_out)
254 0 41 ref $_[0] eq 'ARRAY' ? :
256 0 271 if (not defined $obj) { }
0 271 elsif (&blessed($obj) and $obj->can('pitch')) { }
271 0 elsif (&looks_like_number($obj)) { }
271 4 267 if (defined $prev_in and $pitch == $prev_in) { }
278 23 244 unless defined $input_tonic
286 23 244 unless defined $output_tonic
288 41 226 unless (defined $trans)
290 1 40 unless (&looks_like_number($trans))
297 3 38 if ($trans != 0)
308 0 3 if ($rotate_chrome != 0)
319 3 0 if ($rotate_by != 0)
334 114 153 if defined $prev_in and $pitch - $prev_in < 0
335 227 40 $self->get_contrary ? :
347 227 40 if $self->get_contrary
355 234 33 if ($steps)
359 707 388 if $is_dsc
365 85 182 if ($chromatic_offset != 0)
367 0 85 $step_interval < 0 ? :
370 17 68 if ($chromatic_offset >= $step_interval) { }
384 63 5 if ($step_interval == 2) { }
392 1 4 if ($self->get_modal_chrome > 0) { }
1 3 elsif ($self->get_modal_chrome < 0) { }
405 250 17 unless ($hooked)
406 169 81 if $is_dsc
417 24 17 if $self->get_retrograde
433 17 0 if (defined $input_pitch)
440 0 17 if (not defined $output_pitch and $self->has_modal_out)
444 17 0 if (defined $output_pitch)
463 0 0 unless (defined $asc or defined $dsc)
469 22 0 if (defined $asc)
470 15 7 if (ref $asc eq 'ARRAY') { }
3 4 elsif ($asc =~ /($FORTE_NUMBER_RE)/) { }
473 0 65 unless &looks_like_number($n) and $n =~ /^[+]?[0-9]+$/
481 0 3 unless defined $pset
485 0 4 unless is_scale($asc)
489 4 0 unless defined $dsc
495 4 0 if (@dsc_nums)
505 20 2 if (not defined $dsc) { }
509 16 4 unless $is_scale
511 1 1 if (ref $dsc eq 'ARRAY') { }
1 0 elsif ($dsc =~ /($FORTE_NUMBER_RE)/) { }
513 0 6 unless &looks_like_number($n) and $n =~ /^[+]?[0-9]+$/
521 0 1 unless defined $pset
525 0 0 unless is_scale($dsc)
538 20 2 unless ($self->non_octave_scales)
541 0 40 if $sum == 0
542 25 15 if ($sum < $self->DEG_IN_SCALE) { }
0 15 elsif ($sum > $self->DEG_IN_SCALE) { }
556 0 272 unless &looks_like_number($from)
557 0 272 unless &looks_like_number($to)
558 0 272 if not defined $scale or ref $scale ne 'ARRAY'
563 80 192 $delta < 0 ? :
571 414 691 if $dir == $DSC