File Coverage

blib/lib/Set/IntervalTree.pm
Criterion Covered Total %
statement 22 28 78.5
branch 2 4 50.0
condition n/a
subroutine 7 8 87.5
pod n/a
total 31 40 77.5


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   30562 use 5.006001;
  2         8  
6 2     2   13 use strict;
  2         5  
  2         66  
7 2     2   12 use warnings;
  2         3  
  2         62  
8 2     2   10 use Carp;
  2         5  
  2         238  
9              
10             our $VERSION = '0.10_01'; # TRIAL VERSION
11              
12             require Exporter;
13 2     2   970 use AutoLoader;
  2         2257  
  2         11  
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   38 my $constname;
40 4         8 our $AUTOLOAD;
41 4         22 ($constname = $AUTOLOAD) =~ s/.*:://;
42 4 100       487 croak "&Set::IntervalTree::constant not defined!" if $constname eq 'constant';
43 2         13 my ($error, $val) = constant($constname);
44 0 0         if ($error) { croak $error; }
  0            
45             {
46 2     2   287 no strict 'refs';
  2         6  
  2         201  
  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__