line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package List::SomeUtils; |
2
|
|
|
|
|
|
|
|
3
|
4
|
|
|
4
|
|
46221
|
use 5.006; |
|
4
|
|
|
|
|
8
|
|
4
|
4
|
|
|
4
|
|
15
|
use strict; |
|
4
|
|
|
|
|
4
|
|
|
4
|
|
|
|
|
63
|
|
5
|
4
|
|
|
4
|
|
10
|
use warnings; |
|
4
|
|
|
|
|
3
|
|
|
4
|
|
|
|
|
151
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
our $VERSION = '0.53'; |
8
|
|
|
|
|
|
|
|
9
|
4
|
|
|
4
|
|
13
|
use Exporter qw( import ); |
|
4
|
|
|
|
|
3
|
|
|
4
|
|
|
|
|
101
|
|
10
|
|
|
|
|
|
|
|
11
|
4
|
|
|
4
|
|
1492
|
use Module::Implementation; |
|
4
|
|
|
|
|
14520
|
|
|
4
|
|
|
|
|
441
|
|
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
my @subs = qw( |
14
|
|
|
|
|
|
|
any all none notall |
15
|
|
|
|
|
|
|
true false |
16
|
|
|
|
|
|
|
firstidx lastidx |
17
|
|
|
|
|
|
|
insert_after insert_after_string |
18
|
|
|
|
|
|
|
apply indexes |
19
|
|
|
|
|
|
|
after after_incl before before_incl |
20
|
|
|
|
|
|
|
firstval lastval |
21
|
|
|
|
|
|
|
each_array each_arrayref |
22
|
|
|
|
|
|
|
pairwise natatime |
23
|
|
|
|
|
|
|
mesh uniq |
24
|
|
|
|
|
|
|
minmax part |
25
|
|
|
|
|
|
|
bsearch |
26
|
|
|
|
|
|
|
sort_by nsort_by |
27
|
|
|
|
|
|
|
one any_u all_u none_u notall_u one_u |
28
|
|
|
|
|
|
|
firstres onlyidx onlyval onlyres lastres |
29
|
|
|
|
|
|
|
singleton bsearchidx |
30
|
|
|
|
|
|
|
); |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
my %aliases = ( |
33
|
|
|
|
|
|
|
bsearch_index => 'bsearchidx', |
34
|
|
|
|
|
|
|
distinct => 'uniq', |
35
|
|
|
|
|
|
|
first_index => 'firstidx', |
36
|
|
|
|
|
|
|
first_result => 'firstres', |
37
|
|
|
|
|
|
|
first_value => 'firstval', |
38
|
|
|
|
|
|
|
last_index => 'lastidx', |
39
|
|
|
|
|
|
|
last_result => 'lastres', |
40
|
|
|
|
|
|
|
last_value => 'lastval', |
41
|
|
|
|
|
|
|
only_index => 'onlyidx', |
42
|
|
|
|
|
|
|
only_result => 'onlyres', |
43
|
|
|
|
|
|
|
only_value => 'onlyval', |
44
|
|
|
|
|
|
|
zip => 'mesh', |
45
|
|
|
|
|
|
|
); |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
our @EXPORT_OK = ( @subs, keys %aliases ); |
48
|
|
|
|
|
|
|
our %EXPORT_TAGS = ( all => \@EXPORT_OK ); |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
{ |
51
|
|
|
|
|
|
|
my $loader = Module::Implementation::build_loader_sub( |
52
|
|
|
|
|
|
|
implementations => [ 'XS', 'PP' ], |
53
|
|
|
|
|
|
|
symbols => \@subs, |
54
|
|
|
|
|
|
|
); |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
$loader->(); |
57
|
|
|
|
|
|
|
} |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
for my $alias ( keys %aliases ) { |
60
|
|
|
|
|
|
|
## no critic (TestingAndDebugging::ProhibitNoStrict) |
61
|
4
|
|
|
4
|
|
18
|
no strict 'refs'; |
|
4
|
|
|
|
|
4
|
|
|
4
|
|
|
|
|
257
|
|
62
|
|
|
|
|
|
|
*{$alias} = __PACKAGE__->can( $aliases{$alias} ); |
63
|
|
|
|
|
|
|
} |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
## no critic (Subroutines::ProhibitUnusedPrivateSubroutines) |
66
|
|
|
|
|
|
|
sub _XScompiled { |
67
|
4
|
|
|
4
|
|
3111
|
return Module::Implementation::implementation_for(__PACKAGE__) eq 'XS'; |
68
|
|
|
|
|
|
|
} |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
1; |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
# ABSTRACT: Provide the stuff missing in List::Util |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
__END__ |