line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Template::Plugin::ListCompare;
|
2
|
|
|
|
|
|
|
|
3
|
2
|
|
|
2
|
|
20549
|
use strict;
|
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
64
|
|
4
|
2
|
|
|
2
|
|
10
|
use warnings;
|
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
64
|
|
5
|
2
|
|
|
2
|
|
10
|
use base qw/Template::Plugin List::Compare/;
|
|
2
|
|
|
|
|
12
|
|
|
2
|
|
|
|
|
1537
|
|
6
|
2
|
|
|
2
|
|
74205
|
use List::Compare;
|
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
50
|
|
7
|
|
|
|
|
|
|
|
8
|
2
|
|
|
2
|
|
55
|
use 5.008_008;
|
|
2
|
|
|
|
|
7
|
|
|
2
|
|
|
|
|
468
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
our $VERSION = 0.05;
|
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
sub new {
|
13
|
1
|
|
|
1
|
1
|
365
|
my @params = @_;
|
14
|
1
|
|
|
|
|
3
|
my $class = shift @params;
|
15
|
1
|
|
|
|
|
2
|
my $context = shift @params;
|
16
|
|
|
|
|
|
|
|
17
|
1
|
|
|
|
|
1
|
my ( $unsorted, $accelerated );
|
18
|
|
|
|
|
|
|
|
19
|
1
|
50
|
33
|
|
|
13
|
if ( $params[0] eq '-u' or $params[0] eq '--unsorted' ) {
|
20
|
0
|
|
|
|
|
0
|
$unsorted = shift @params;
|
21
|
|
|
|
|
|
|
}
|
22
|
|
|
|
|
|
|
|
23
|
1
|
50
|
33
|
|
|
8
|
if ( $params[0] eq '-a' or $params[0] eq '--accelerated' ) {
|
24
|
0
|
|
|
|
|
0
|
$accelerated = shift @params;
|
25
|
|
|
|
|
|
|
}
|
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
#Create arrayrefs from the scalar parameters:
|
28
|
1
|
50
|
|
|
|
2
|
@params = map { ref($_) eq q{} ? [$_] : $_ } @params;
|
|
3
|
|
|
|
|
10
|
|
29
|
|
|
|
|
|
|
|
30
|
1
|
50
|
|
|
|
3
|
if ($accelerated) {
|
31
|
0
|
|
|
|
|
0
|
unshift @params, $accelerated;
|
32
|
|
|
|
|
|
|
}
|
33
|
|
|
|
|
|
|
|
34
|
1
|
50
|
|
|
|
3
|
if ($unsorted) {
|
35
|
0
|
|
|
|
|
0
|
unshift @params, $unsorted;
|
36
|
|
|
|
|
|
|
}
|
37
|
|
|
|
|
|
|
|
38
|
1
|
|
|
|
|
5
|
my $self = List::Compare->new(@params);
|
39
|
1
|
|
|
|
|
431
|
return bless $self, $class;
|
40
|
|
|
|
|
|
|
}
|
41
|
|
|
|
|
|
|
|
42
|
0
|
|
|
0
|
1
|
|
sub get_version { return $VERSION; }
|
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
1;
|
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
__END__
|