line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Set::IntervalTree; |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
# ABSTRACT: Perform range-based lookups on sets of ranges |
4
|
|
|
|
|
|
|
|
5
|
2
|
|
|
2
|
|
163425
|
use 5.006001; |
|
2
|
|
|
|
|
8
|
|
6
|
2
|
|
|
2
|
|
12
|
use strict; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
50
|
|
7
|
2
|
|
|
2
|
|
13
|
use warnings; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
58
|
|
8
|
2
|
|
|
2
|
|
11
|
use Carp; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
175
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
our $VERSION = '0.11'; # VERSION |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
require Exporter; |
13
|
2
|
|
|
2
|
|
1774
|
use AutoLoader; |
|
2
|
|
|
|
|
3142
|
|
|
2
|
|
|
|
|
12
|
|
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
our @ISA = qw(Exporter); |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
# Items to export into callers namespace by default. Note: do not export |
18
|
|
|
|
|
|
|
# names by default without a very good reason. Use EXPORT_OK instead. |
19
|
|
|
|
|
|
|
# Do not simply export all your public functions/methods/constants. |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
# This allows declaration use Set::IntervalTree ':all'; |
22
|
|
|
|
|
|
|
# If you do not need this, moving things directly into @EXPORT or @EXPORT_OK |
23
|
|
|
|
|
|
|
# will save memory. |
24
|
|
|
|
|
|
|
our %EXPORT_TAGS = ( 'all' => [ qw( |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
) ] ); |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
our @EXPORT_OK = ( @{ $EXPORT_TAGS{'all'} } ); |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
our @EXPORT = qw( |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
); |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
sub AUTOLOAD { |
36
|
|
|
|
|
|
|
# This AUTOLOAD is used to 'autoload' constants from the constant() |
37
|
|
|
|
|
|
|
# XS function. |
38
|
|
|
|
|
|
|
|
39
|
4
|
|
|
4
|
|
244
|
my $constname; |
40
|
4
|
|
|
|
|
9
|
our $AUTOLOAD; |
41
|
4
|
|
|
|
|
30
|
($constname = $AUTOLOAD) =~ s/.*:://; |
42
|
4
|
100
|
|
|
|
757
|
croak "&Set::IntervalTree::constant not defined!" if $constname eq 'constant'; |
43
|
2
|
|
|
|
|
20
|
my ($error, $val) = constant($constname); |
44
|
0
|
0
|
|
|
|
|
if ($error) { croak $error; } |
|
0
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
{ |
46
|
2
|
|
|
2
|
|
383
|
no strict 'refs'; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
222
|
|
|
0
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
# Fixed between 5.005_53 and 5.005_61 |
48
|
|
|
|
|
|
|
#XXX if ($] >= 5.00561) { |
49
|
|
|
|
|
|
|
#XXX *$AUTOLOAD = sub () { $val }; |
50
|
|
|
|
|
|
|
#XXX } |
51
|
|
|
|
|
|
|
#XXX else { |
52
|
0
|
|
|
0
|
|
|
*$AUTOLOAD = sub { $val }; |
|
0
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
#XXX } |
54
|
|
|
|
|
|
|
} |
55
|
0
|
|
|
|
|
|
goto &$AUTOLOAD; |
56
|
|
|
|
|
|
|
} |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
require XSLoader; |
59
|
|
|
|
|
|
|
XSLoader::load('Set::IntervalTree', $VERSION); |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
# Preloaded methods go here. |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
# Autoload methods go after =cut, and are processed by the autosplit program. |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
1; |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
__END__ |