line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package List::Utils::MoveElement; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
1352
|
use 5.008; |
|
1
|
|
|
|
|
3
|
|
4
|
1
|
|
|
1
|
|
6
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
23
|
|
5
|
1
|
|
|
1
|
|
5
|
use warnings; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
39
|
|
6
|
1
|
|
|
1
|
|
7
|
use Exporter; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
179
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
BEGIN { |
9
|
1
|
|
|
1
|
|
4
|
our $VERSION = qw/0.01/; |
10
|
1
|
|
|
|
|
21
|
our @ISA = qw/Exporter/; |
11
|
1
|
|
|
|
|
4
|
our @EXPORT = qw/move_element_left move_element_right move_element_to_beginning move_element_to_end/; |
12
|
1
|
|
|
|
|
2
|
our $xs_loaded; |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
# Load XS version if available, otherwise load PP version |
15
|
1
|
|
|
|
|
2
|
local $@; |
16
|
|
|
|
|
|
|
eval { |
17
|
1
|
|
|
|
|
6
|
require XSLoader; |
18
|
1
|
|
|
|
|
2649
|
XSLoader::load('List::Utils::MoveElement', $VERSION); |
19
|
0
|
|
|
|
|
0
|
$xs_loaded = 1; |
20
|
1
|
50
|
|
|
|
2
|
} or do { |
21
|
1
|
|
|
|
|
16
|
require List::Utils::MoveElement::PP; |
22
|
1
|
|
|
1
|
|
6
|
no strict 'refs'; |
|
1
|
|
|
|
|
8
|
|
|
1
|
|
|
|
|
119
|
|
23
|
1
|
|
|
|
|
3
|
*left = \&{'List::Utils::MoveElement::PP::left'}; |
|
1
|
|
|
|
|
7
|
|
24
|
1
|
|
|
|
|
2
|
*right = \&{'List::Utils::MoveElement::PP::right'}; |
|
1
|
|
|
|
|
4
|
|
25
|
1
|
|
|
|
|
2
|
*to_beginning = \&{'List::Utils::MoveElement::PP::to_beginning'}; |
|
1
|
|
|
|
|
4
|
|
26
|
1
|
|
|
|
|
2
|
*to_end = \&{'List::Utils::MoveElement::PP::to_end'}; |
|
1
|
|
|
|
|
4
|
|
27
|
|
|
|
|
|
|
}; |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
# Alias long names to short names |
30
|
|
|
|
|
|
|
{ |
31
|
1
|
|
|
1
|
|
7
|
no strict 'refs'; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
87
|
|
|
1
|
|
|
|
|
3
|
|
32
|
1
|
|
|
|
|
12
|
*move_element_left = \&{__PACKAGE__ . '::left'}; |
|
1
|
|
|
|
|
5
|
|
33
|
1
|
|
|
|
|
3
|
*move_element_right = \&{__PACKAGE__ . '::right'}; |
|
1
|
|
|
|
|
3
|
|
34
|
1
|
|
|
|
|
3
|
*move_element_to_beginning = \&{__PACKAGE__ . '::to_beginning'}; |
|
1
|
|
|
|
|
2
|
|
35
|
1
|
|
|
|
|
2
|
*move_element_to_end = \&{__PACKAGE__ . '::to_end'}; |
|
1
|
|
|
|
|
64
|
|
36
|
|
|
|
|
|
|
} |
37
|
|
|
|
|
|
|
} |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
1; |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
__END__ |