line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Tree::RB::Node::_Constants;
|
2
|
|
|
|
|
|
|
|
3
|
8
|
|
|
8
|
|
854
|
use strict;
|
|
8
|
|
|
|
|
14
|
|
|
8
|
|
|
|
|
305
|
|
4
|
8
|
|
|
8
|
|
38
|
use Carp;
|
|
8
|
|
|
|
|
12
|
|
|
8
|
|
|
|
|
515
|
|
5
|
8
|
|
|
8
|
|
45
|
use vars qw( $VERSION @EXPORT );
|
|
8
|
|
|
|
|
12
|
|
|
8
|
|
|
|
|
976
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
$VERSION = '0.3';
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
require Exporter;
|
10
|
|
|
|
|
|
|
*import = \&Exporter::import;
|
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
my @Node_slots;
|
13
|
|
|
|
|
|
|
my @Node_colors;
|
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
BEGIN {
|
16
|
8
|
|
|
8
|
|
37
|
@Node_slots = qw(PARENT LEFT RIGHT COLOR KEY VAL);
|
17
|
8
|
|
|
|
|
442
|
@Node_colors = qw(RED BLACK);
|
18
|
|
|
|
|
|
|
}
|
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
@EXPORT = (@Node_colors, map {"_$_"} @Node_slots);
|
21
|
|
|
|
|
|
|
|
22
|
8
|
|
|
8
|
|
5041
|
use enum @Node_colors;
|
|
8
|
|
|
|
|
15198
|
|
|
8
|
|
|
|
|
120
|
|
23
|
8
|
|
|
8
|
|
2527
|
use enum @Node_slots;
|
|
8
|
|
|
|
|
15
|
|
|
8
|
|
|
|
|
40
|
|
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
# enum doesn't allow symbols to start with "_", but we want them
|
26
|
|
|
|
|
|
|
foreach my $s (@Node_slots) {
|
27
|
8
|
|
|
8
|
|
4247
|
no strict 'refs';
|
|
8
|
|
|
|
|
16
|
|
|
8
|
|
|
|
|
668
|
|
28
|
|
|
|
|
|
|
*{"_$s"} = \&$s;
|
29
|
|
|
|
|
|
|
delete $Tree::RB::Node::_Constants::{$s};
|
30
|
|
|
|
|
|
|
}
|
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
1; # Magic true value required at end of module
|
33
|
|
|
|
|
|
|
__END__
|