| line |
true |
false |
branch |
|
17
|
0 |
14 |
unless $infile and $outfile and defined $percent || defined $lines |
|
18
|
0 |
14 |
if defined $percent and defined $lines |
|
19
|
0 |
8 |
if defined $percent and $percent < 0 || $percent > 100 |
|
20
|
0 |
14 |
unless $mode =~ /^(random|start|end)$/ |
|
24
|
7 |
7 |
if (not defined $streaming or $streaming == 0) { } |
|
50
|
0 |
7 |
unless my $in = "IO::File"->new($infile, "<:raw") |
|
53
|
0 |
7 |
if defined $lines and $lines > scalar @lines |
|
55
|
3 |
4 |
if ($mode eq "random") |
|
56
|
3 |
0 |
if defined $seed |
|
61
|
4 |
3 |
if (defined $percent) { } |
|
67
|
2 |
5 |
$mode eq 'end' ? : |
|
70
|
0 |
7 |
unless my $out = "IO::File"->new($outfile, ">:raw") |
|
85
|
0 |
7 |
unless my $in = "IO::File"->new($infile, "<:encoding(UTF-8)") |
|
89
|
70 |
7 |
if $line =~ /^\s*[\{\[]/ |
|
94
|
0 |
7 |
if defined $lines and $lines > $total |
|
98
|
4 |
3 |
if (defined $percent) { } |
|
106
|
2 |
5 |
if ($mode eq 'start') { } |
|
|
2 |
3 |
elsif ($mode eq 'end') { } |
|
111
|
3 |
0 |
if defined $seed |
|
114
|
9 |
21 |
if (rand $total - $i < $count) |
|
117
|
3 |
6 |
if $count == 0 |
|
122
|
0 |
7 |
unless open $in, "<:raw", $infile |
|
123
|
0 |
7 |
unless open my $out, ">:raw", $outfile |
|
127
|
5 |
56 |
unless $line =~ /^\s*[\{\[]/ |
|
129
|
21 |
35 |
if $picked{$real} |
|
132
|
2 |
54 |
if ($mode eq "start" and $real >= $count) |