line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Tree::RB::Node::_Constants;
|
2
|
|
|
|
|
|
|
|
3
|
8
|
|
|
8
|
|
573
|
use strict;
|
|
8
|
|
|
|
|
9
|
|
|
8
|
|
|
|
|
254
|
|
4
|
8
|
|
|
8
|
|
29
|
use Carp;
|
|
8
|
|
|
|
|
11
|
|
|
8
|
|
|
|
|
412
|
|
5
|
8
|
|
|
8
|
|
36
|
use vars qw( $VERSION @EXPORT );
|
|
8
|
|
|
|
|
11
|
|
|
8
|
|
|
|
|
810
|
|
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
|
|
35
|
@Node_slots = qw(PARENT LEFT RIGHT COLOR KEY VAL);
|
17
|
8
|
|
|
|
|
366
|
@Node_colors = qw(RED BLACK);
|
18
|
|
|
|
|
|
|
}
|
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
@EXPORT = (@Node_colors, map {"_$_"} @Node_slots);
|
21
|
|
|
|
|
|
|
|
22
|
8
|
|
|
8
|
|
126473
|
use enum @Node_colors;
|
|
8
|
|
|
|
|
8845
|
|
|
8
|
|
|
|
|
84
|
|
23
|
8
|
|
|
8
|
|
1696
|
use enum @Node_slots;
|
|
8
|
|
|
|
|
15
|
|
|
8
|
|
|
|
|
30
|
|
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
# enum doesn't allow symbols to start with "_", but we want them
|
26
|
|
|
|
|
|
|
foreach my $s (@Node_slots) {
|
27
|
8
|
|
|
8
|
|
3361
|
no strict 'refs';
|
|
8
|
|
|
|
|
15
|
|
|
8
|
|
|
|
|
521
|
|
28
|
|
|
|
|
|
|
*{"_$s"} = \&$s;
|
29
|
|
|
|
|
|
|
delete $Tree::RB::Node::_Constants::{$s};
|
30
|
|
|
|
|
|
|
}
|
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
1; # Magic true value required at end of module
|
33
|
|
|
|
|
|
|
__END__
|