Branch Coverage

blib/lib/Math/OEIS/SortedFile.pm
Criterion Covered Total %
branch 13 26 50.0


line true false branch
71 2 0 if (ref $self and defined $self->{'filename'})
79 0 0 if (defined $filename)
87 0 13 unless (ref $self)
88 2 11 unless (exists $self->{'fh'})
89 2 0 if (defined(my $filename = $self->filename))
91 2 0 if (open $fh, '<', $filename)
100 0 0 if (my $fh = delete $self->{'fh'})
101 0 0 if (not CORE::close $fh)
114 62 221 $line =~ /^(A\d{6,})/ ? :
124 0 13 unless (ref $self)
130 0 268 unless my($got_anum) = $self->line_to_anum($line)
135 0 13 if ($pos < 0)
146 7 6 defined($line = readline $fh) && $self->line_to_anum($line) eq $anum ? :