Branch Coverage

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


line true false branch
77 2 0 if (ref $self and defined $self->{'filename'})
85 0 0 if (defined $filename)
93 0 13 unless (ref $self)
94 2 11 unless (exists $self->{'fh'})
95 2 0 if (defined(my $filename = $self->filename))
97 2 0 if (open $fh, '<', $filename)
106 0 0 if (my $fh = delete $self->{'fh'})
107 0 0 if (not CORE::close $fh)
120 62 221 $line =~ /^(A\d{6,})/ ? :
130 0 13 unless (ref $self)
136 0 268 unless my($got_anum) = $self->line_to_anum($line)
141 0 13 if ($pos < 0)
152 7 6 defined($line = readline $fh) && $self->line_to_anum($line) eq $anum ? :