line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
10
|
|
|
10
|
|
57
|
use strict; |
|
10
|
|
|
|
|
18
|
|
|
10
|
|
|
|
|
1018
|
|
2
|
10
|
|
|
10
|
|
57
|
use warnings; |
|
10
|
|
|
|
|
17
|
|
|
10
|
|
|
|
|
1747
|
|
3
|
|
|
|
|
|
|
package Hash::MostUtils::leach; |
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
use provide ( |
6
|
10
|
|
|
|
|
98
|
if => ge => 5.013 => 'Hash::MostUtils::leach::v5_13', |
7
|
|
|
|
|
|
|
else => 'Hash::MostUtils::leach::v5_10', |
8
|
10
|
|
|
10
|
|
12123
|
); |
|
10
|
|
|
|
|
38248
|
|
9
|
|
|
|
|
|
|
|
10
|
10
|
|
|
10
|
|
3037
|
use Scalar::Util qw(refaddr); |
|
10
|
|
|
|
|
22
|
|
|
10
|
|
|
|
|
3749
|
|
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
{ |
13
|
|
|
|
|
|
|
my %end; |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
# n-ary each for lists |
16
|
|
|
|
|
|
|
sub _n_each { |
17
|
80
|
|
|
80
|
|
91
|
my $n = shift; |
18
|
80
|
|
|
|
|
90
|
my $data = shift; |
19
|
|
|
|
|
|
|
|
20
|
80
|
|
|
|
|
134
|
my $ident = refaddr($data); |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
# does it look hashlike? cast to an array ref for indexing. |
23
|
|
|
|
|
|
|
$data = [ %$data ] if |
24
|
80
|
100
|
|
|
|
79
|
do { local $@; eval { scalar keys %$data; 1 } }; |
|
80
|
|
|
|
|
94
|
|
|
80
|
|
|
|
|
101
|
|
|
80
|
|
|
|
|
303
|
|
|
47
|
|
|
|
|
189
|
|
25
|
|
|
|
|
|
|
|
26
|
80
|
100
|
100
|
|
|
109
|
if ($#{$data} < ($end{$ident} || 0)) { |
|
80
|
|
|
|
|
306
|
|
27
|
14
|
|
|
|
|
26
|
delete $end{$ident}; |
28
|
14
|
|
|
|
|
37
|
return (); |
29
|
|
|
|
|
|
|
} |
30
|
|
|
|
|
|
|
|
31
|
65
|
|
|
|
|
99
|
$end{$ident} += $n; |
32
|
65
|
|
|
|
|
193
|
return @{$data}[$end{$ident} - $n .. $end{$ident} - 1]; |
|
65
|
|
|
|
|
195
|
|
33
|
|
|
|
|
|
|
} |
34
|
|
|
|
|
|
|
} |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
1; |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
__END__ |