| blib/lib/File/RandomLine.pm | |||
|---|---|---|---|
| Criterion | Covered | Total | % |
| branch | 24 | 24 | 100.0 |
| line | true | false | branch |
|---|---|---|---|
| 18 | 1 | 5 | unless $filename |
| 20 | 1 | 4 | if $algo and not $algo =~ /fast|uniform/i |
| 21 | 1 | 3 | unless open my $fh, '<', $filename |
| 22 | 1 | 2 | lc $algo eq 'uniform' ? : |
| 24 | 1 | 2 | $line_index ? : |
| 30 | 1 | 2 | ref $class ? : |
| 55 | 4 | 56 | if (not defined $n and wantarray) |
| 59 | 6 | 54 | unless (not defined $n or $n =~ /^\d+$/) |
| 62 | 2 | 52 | if defined $n and $n == 0 |
| 67 | 12 | 48 | $$self{'line_index'} ? : |
| 70 | 6 | 48 | wantarray ? : |
| 83 | 12 | 36 | if eof $fh |