Debian Codegraph @

contrib/DNS-LDNS/lib/DNS/LDNS/RBTree.pm

raw
1 package DNS::LDNS::RBTree;
2
3 use 5.008008;
4 use strict;
5 use warnings;
6
7 use DNS::LDNS;
8
9 our $VERSION = '0.61';
10
11 # Note: Since this class does not have a constructor, we can let its child
12 # objects be owned by the parent. This reduces the recursion depth on
13 # DESTROY.
14
15 sub first {
16 my $self = shift;
17 return DNS::LDNS::GC::own($self->_first, $self);
18 }
19
20 sub last {
21 my $self = shift;
22 return DNS::LDNS::GC::own($self->_last, $self);
23 }
24
25 sub DESTROY {
26 DNS::LDNS::GC::free($_[0]);
27 }
28
29 1;
30 __END__
31
32 =head1 NAME
33
34 DNS::LDNS::RBTree - Tree of DNSSecName nodes
35
36 =head1 SYNOPSIS
37
38 use DNS::LDNS ':all'
39
40 rbnode = rbtree->first
41 rbnode = rbtree->last
42
43 =head1 SEE ALSO
44
45 http://www.nlnetlabs.nl/projects/ldns
46
47 =head1 AUTHOR
48
49 Erik Pihl Ostlyngen, E<lt>[email protected]<gt>
50
51 =head1 COPYRIGHT AND LICENSE
52
53 Copyright (C) 2013 by UNINETT Norid AS
54
55 This library is free software; you can redistribute it and/or modify
56 it under the same terms as Perl itself, either Perl version 5.14.2 or,
57 at your option, any later version of Perl 5 you may have available.
58
59 =cut