blib/lib/Math/NumSeq/OEIS/File.pm | |||
---|---|---|---|
Criterion | Covered | Total | % |
branch | 21 | 184 | 11.4 |
line | true | false | branch | |||||
---|---|---|---|---|---|---|---|---|
54 | 0 | 0 | unless eval { do { require Encode; 1 } } | |||||
59 | 0 | 0 | if (ref $class_or_self and defined $$class_or_self{'description'}) { } | |||||
87 | 0 | 0 | if ($analyze_characteristics{$key}) | |||||
117 | 0 | 0 | unless $self | |||||
118 | 0 | 0 | unless $$self{'fh'} | |||||
121 | 0 | 0 | if (open $fh, "< $$self{'filename'}") { } | |||||
152 | 2 | 128 | unless ($new > $iv and ($new & 1) == 1) | |||||
165 | 0 | 2 | $iv_len < $nv_len ? : | |||||
210 | 10 | 120 | if $afile_exclude{$basefile} | |||||
212 | 44 | 76 | if $$self{'_dont_use_afile'} and $basefile =~ /^a/ | |||||
213 | 39 | 37 | if $$self{'_dont_use_bfile'} and $basefile =~ /^b/ | |||||
218 | 37 | 0 | unless (open $fh, "< $filename") | |||||
225 | 0 | 0 | unless (_afile_is_good($self)) | |||||
241 | 65 | 0 | unless ($have_info or $$self{'fh'}) | |||||
252 | 0 | 0 | if ($$self{'analyze_done'}) | |||||
274 | 0 | 0 | if (not defined $values_min or $value < $values_min) | |||||
277 | 0 | 0 | if (not defined $values_max or $value > $values_max) | |||||
281 | 0 | 0 | if (defined $prev_value) | |||||
283 | 0 | 0 | if ($cmp < 0) | |||||
288 | 0 | 0 | if ($cmp <= 0) | |||||
302 | 0 | 0 | if (my $fh = $$self{'fh'}) { } | |||||
306 | 0 | 0 | if $total_count > 200 | |||||
324 | 0 | 0 | if (not defined $$self{'values_min'} and $range_is_small || $$self{'characteristic'}{'OEIS_full'} || !$$self{'characteristic'}{'OEIS_sign'}) | |||||
331 | 0 | 0 | if (not defined $$self{'values_max'} and $range_is_small || $$self{'characteristic'}{'OEIS_full'}) | |||||
345 | 0 | 0 | if (defined $prev_i and $increasing_from_i < $prev_i) | |||||
346 | 0 | 0 | if ($increasing_from_i - $i_start < 20) | |||||
349 | 0 | 0 | if ($increasing_from_i == $i_start) | |||||
355 | 0 | 0 | if (defined $prev_i and $non_decreasing_from_i < $prev_i) | |||||
356 | 0 | 0 | if ($non_decreasing_from_i - $i_start < 20) | |||||
359 | 0 | 0 | if ($non_decreasing_from_i == $i_start) | |||||
386 | 0 | 0 | unless seek $$self{'fh'}, $pos, 0 | |||||
392 | 0 | 0 | if ($pos < 0) | |||||
412 | 0 | 0 | if (my $fh = $$self{'fh'}) { } | |||||
414 | 0 | 0 | if (defined(my $pos = delete $$self{'next_seek'})) | |||||
422 | 0 | 0 | unless my($value) = _array_value($self, $$self{'array_pos'}++) | |||||
435 | 0 | 0 | if ($pos > $#$array) | |||||
443 | 0 | 0 | if (not ref $value and length $value > 14) | |||||
461 | 0 | 0 | if ($line =~ /^\s*(#|$)/) | |||||
468 | 0 | 0 | if (my($i, $value) = $line =~ /^\s* ([0-9]+) # i [ \t]+ (-?[0-9]+) # value [ \t]* $/x) | |||||
475 | 0 | 0 | if (length $value > 14) | |||||
499 | 0 | 0 | if ($line =~ /^\s*(#|$)/) | |||||
506 | 0 | 0 | unless my($i, $value) = $line =~ /^(-?[0-9]+) # i [ \t]+ (-?[0-9]+) # value [ \t]* $/x | |||||
513 | 0 | 0 | if (defined $prev_i and $i != $prev_i + 1) | |||||
520 | 0 | 0 | if ($good >= 3) | |||||
533 | 13 | 52 | if $$self{'_dont_use_internal'} | |||||
536 | 52 | 0 | unless my($fullname, $contents) = _slurp_oeis_file($self, $basefile) | |||||
538 | 0 | 0 | if (_HAVE_ENCODE) | |||||
547 | 0 | 0 | if ($contents =~ /^%O\s+\Q$anum\E\s+(\d+)/im) { } | |||||
555 | 0 | 0 | if ($contents =~ /^%N\s+\Q$anum\E\s+(.*)/im) { } | |||||
570 | 0 | 0 | unless ($$self{'fh'}) | |||||
576 | 0 | 0 | unless (@samples) | |||||
580 | 0 | 0 | unless (@samples) | |||||
592 | 0 | 0 | unless ($$self{'characteristic'}{'digits'}) | |||||
608 | 13 | 52 | if $$self{'_dont_use_internal'} | |||||
611 | 52 | 0 | unless my($fullname, $contents) = _slurp_oeis_file($self, $basefile) | |||||
618 | 0 | 0 | if ($contents =~ /(^|)%O\s+(\d+)/im) { } | |||||
625 | 0 | 0 | if ($contents =~ /(^|)%N (.*?)(|$)/im) { } | |||||
640 | 0 | 0 | unless ($$self{'fh'}) | |||||
646 | 0 | 0 | unless (@samples) | |||||
650 | 0 | 0 | unless (@samples) | |||||
662 | 0 | 0 | unless ($$self{'characteristic'}{'digits'}) | |||||
682 | 13 | 52 | if $$self{'_dont_use_html'} | |||||
685 | 104 | 0 | unless my($fullname, $contents) = _slurp_oeis_file($self, $basefile) | |||||
689 | 0 | 0 | if ($contents =~ m[${anum}[ \t]*\n.*? # target anum | ]*>\s*(?: | )? #empty | ]*> # |
\s*
(.*?) # text through to ...
( |?td) # or | or ]six) { } |
708 | 0 | 0 | if ($contents =~ m[KEYWORD.*?<[tT][tT][^>]*>(.*?)[tT][tT]>]s) { } | |||||
716 | 0 | 0 | unless ($$self{'fh'}) | |||||
727 | 0 | 0 | unless ($$self{'characteristic'}{'digits'}) | |||||
746 | 208 | 0 | unless (open FH, "< $filename") | |||||
751 | 0 | 0 | unless close FH | |||||
772 | 0 | 0 | if ($$self{'fh'}) { } | |||||
787 | 0 | 0 | unless (defined $keywords) | |||||
806 | 0 | 0 | if ($$self{'characteristic'}{'OEIS_cons'} and not $$self{'characteristic'}{'OEIS_base'} and $$self{'anum'} ne 'A000012') | |||||
814 | 0 | 0 | if (defined(my $description = $$self{'description'})) | |||||
815 | 0 | 0 | if ($description =~ /expansion of .* in base (\d+)/i) | |||||
820 | 0 | 0 | if ($description =~ /^number of /i) | |||||
829 | 0 | 0 | unless (defined $str and $str =~ /^([0-9,-]|\s)+$/) | |||||
830 | 0 | 0 | defined $str ? : | |||||
843 | 0 | 0 | if (_HAVE_ENCODE and $contents =~ /]+ http-equiv=[^>]+ content-type[^>]+ charset=([a-z0-9-_]+)/six) { } | |||||
865 | 0 | 0 | if (my $fh = $$self{'fh'}) { } | |||||
866 | 0 | 0 | unless (defined $$self{'next_seek'}) | |||||
870 | 0 | 0 | if (defined $$self{'fh_i'} and $i <= $$self{'fh_i'} + 20) | |||||
872 | 0 | 0 | if (my($line_i, $value) = _readline($self)) | |||||
873 | 0 | 0 | if ($line_i == $i) | |||||
886 | 0 | 0 | unless (defined <$fh>) | |||||
892 | 0 | 0 | if ($mid >= $hi) | |||||
896 | 0 | 0 | unless my($line_i, $value) = _readline($self) | |||||
901 | 0 | 0 | if ($line_i == $i) | |||||
905 | 0 | 0 | if ($line_i < $i) { } | |||||
916 | 0 | 0 | unless my($line_i, $value) = _readline($self) | |||||
918 | 0 | 0 | if ($line_i == $i) | |||||
923 | 0 | 0 | if ($line_i > $i) | |||||
931 | 0 | 0 | unless ($i >= 0) |