| line |
true |
false |
branch |
|
99
|
0 |
1 |
if (exists $param->{'file'} and exists $param->{'fh'}) |
|
103
|
1 |
5 |
if (exists $param->{'file'}) { } |
|
|
0 |
5 |
elsif (exists $param->{'fh'}) { } |
|
113
|
0 |
2 |
unless @_ |
|
115
|
2 |
0 |
if (@_ > 1) |
|
125
|
0 |
2 |
unless &looks_like_number($cents) |
|
126
|
1 |
1 |
if (defined $precision) { } |
|
127
|
0 |
1 |
if not &looks_like_number($precision) or $precision < 0 |
|
140
|
0 |
1 |
if not &looks_like_number($freq) or $freq <= 0 |
|
152
|
0 |
3 |
unless $self->has_notes |
|
158
|
1 |
5 |
unless $self->has_notes |
|
164
|
0 |
3 |
unless $self->has_notes |
|
170
|
0 |
5 |
unless $self->has_notes |
|
175
|
0 |
5 |
ref $_[0] eq 'ARRAY' ? : |
|
176
|
5 |
74 |
if ($i == 0) { } |
|
179
|
35 |
39 |
$i < 0 ? : |
|
192
|
28 |
46 |
if $is_dsc and $offset != 0 |
|
194
|
58 |
16 |
if ($octave_count > 0) |
|
196
|
35 |
23 |
if $is_dsc |
|
201
|
59 |
15 |
if ($offset != 0) |
|
219
|
0 |
2 |
unless $self->has_notes |
|
224
|
1 |
1 |
if $ratios[-1] != 2 |
|
229
|
0 |
12 |
if $r < 0 |
|
234
|
0 |
12 |
if defined $min and $r <= $min |
|
246
|
0 |
17 |
ref $_[0] eq 'ARRAY' ? : |
|
247
|
20 |
22 |
if ($n =~ m[([0-9]+)/([1-9][0-9]*)]) { } |
|
261
|
0 |
11 |
ref $_[0] eq 'ARRAY' ? : |
|
262
|
25 |
57 |
if ($n =~ m[([0-9]+)/([1-9][0-9]*)]) { } |
|
275
|
0 |
54 |
if not &looks_like_number($pitch) or $pitch < 0 |
|
284
|
0 |
2 |
unless &looks_like_number($ratio) |
|
285
|
1 |
1 |
if (defined $precision) { } |
|
286
|
0 |
1 |
if not &looks_like_number($precision) or $precision < 0 |
|
300
|
1 |
9 |
if (@_ == 1) { } |
|
307
|
10 |
0 |
if (exists $param{'file'}) { } |
|
|
0 |
0 |
elsif (exists $param{'fh'}) { } |
|
308
|
1 |
9 |
unless open $fh, '<', $param{'file'} |
|
314
|
1 |
8 |
if (exists $param{'binmode'}) { } |
|
|
5 |
3 |
elsif ($self->has_binmode) { } |
|
315
|
0 |
1 |
unless binmode $fh, $param{'binmode'} |
|
317
|
0 |
5 |
unless binmode $fh, $self->get_binmode |
|
323
|
0 |
29 |
unless defined $line |
|
324
|
1 |
28 |
if ++$line_count >= $self->MAX_LINES |
|
325
|
12 |
16 |
if $line =~ /^[!]/ |
|
330
|
8 |
8 |
if @scala == 2 |
|
333
|
0 |
8 |
if (@scala != 2) |
|
339
|
8 |
0 |
if ($scala[-1] =~ /^\s*([0-9]+)/) { } |
|
349
|
0 |
94 |
unless defined $line |
|
350
|
0 |
94 |
if ++$line_count >= $self->MAX_LINES |
|
351
|
6 |
88 |
if $line =~ /^[!]/ |
|
361
|
51 |
37 |
if ($line =~ /^\s* ( -?[0-9]+\. [0-9]* ) /x) { } |
|
|
0 |
37 |
elsif ($line =~ /^\s* -[0-9] /x) { } |
|
|
37 |
0 |
elsif ($line =~ m[^\s* ( [1-9][0-9]* (?:/[0-9]+)? ) ]x) { } |
|
368
|
2 |
35 |
unless $ratio =~ m[/] |
|
380
|
8 |
80 |
if $cur_note++ >= $NOTECOUNT |
|
382
|
0 |
8 |
if (@notes != $NOTECOUNT) |
|
388
|
1 |
7 |
if sprintf('%.0f', $self->notes2cents($notes[0])) == 0 |
|
398
|
0 |
2 |
unless @_ |
|
400
|
2 |
0 |
if (@_ > 1) |
|
413
|
1 |
1 |
ref $_[0] eq 'ARRAY' ? : |
|
414
|
0 |
2 |
if @$freqs < 2 |
|
415
|
0 |
2 |
if $freqs->[0] == 0 |
|
426
|
0 |
2 |
if sprintf('%.0f', $self->notes2cents($notes[0])) == 0 |
|
436
|
1 |
2 |
ref $_[0] eq 'ARRAY' ? : |
|
437
|
6 |
4 |
if ($n =~ /^ -?[0-9]+\. (?:[0-9]+)? $/x) { } |
|
|
4 |
0 |
elsif ($n =~ m[^ [1-9][0-9]* (?:/[0-9]+)? $]x) { } |
|
441
|
0 |
4 |
unless $ratio =~ m[/] |
|
450
|
0 |
3 |
if sprintf('%.0f', $self->notes2cents($notes[0])) == 0 |
|
458
|
0 |
2 |
unless $self->has_notes |
|
461
|
0 |
2 |
if (@_ == 1) { } |
|
468
|
1 |
1 |
if (exists $param{'file'}) { } |
|
|
1 |
0 |
elsif (exists $param{'fh'}) { } |
|
469
|
0 |
1 |
unless open $fh, '>', $param{'file'} |
|
475
|
1 |
1 |
if (exists $param{'binmode'}) { } |
|
|
1 |
0 |
elsif ($self->has_binmode) { } |
|
476
|
0 |
1 |
unless binmode $fh, $param{'binmode'} |
|
478
|
0 |
1 |
unless binmode $fh, $self->get_binmode |
|
482
|
1 |
1 |
if exists $param{'file'} |
|
485
|
1 |
1 |
defined $filename ? : |