Debian Codegraph @

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

raw
1 package DNS::LDNS::DNSSecRRSets;
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 rrs {
16 my $self = shift;
17 return DNS::LDNS::GC::own($self->_rrs, DNS::LDNS::GC::owner($self));
18 }
19
20 sub signatures {
21 my $self = shift;
22 return DNS::LDNS::GC::own($self->_signatures, DNS::LDNS::GC::owner($self));
23 }
24
25 sub next {
26 my $self = shift;
27 return DNS::LDNS::GC::own($self->_next, DNS::LDNS::GC::owner($self));
28 }
29
30 sub set_type {
31 my ($self, $type) = @_;
32 my $s = _set_type($self, $type);
33 $DNS::LDNS::last_status = $s;
34 return $s;
35 }
36
37 sub add_rr {
38 my ($self, $rr) = @_;
39
40 my $s = _add_rr($self, my $copy = $rr->clone);
41 $DNS::LDNS::last_status = $s;
42 DNS::LDNS::GC::own($copy, $self);
43 return $s;
44 }
45
46 sub DESTROY {
47 DNS::LDNS::GC::free($_[0]);
48 }
49
50 1;
51 __END__
52
53 =head1 NAME
54
55 DNS::LDNS::DNSSecRRSets - Linked list of rrsets in a dnssec zone
56
57 =head1 SYNOPSIS
58
59 use DNS::LDNS ':all'
60
61 rrs = rrsets->rrs
62 rrs = rrsets->signatures
63 rrsets2 = rrsets->next
64 rrsets->add_rr(rr)
65 bool = rrsets->contains_type(rr_type)
66 rr_type = rrsets->type
67 rrsets->set_type(rr_type)
68
69 =head1 SEE ALSO
70
71 http://www.nlnetlabs.nl/projects/ldns
72
73 =head1 AUTHOR
74
75 Erik Pihl Ostlyngen, E<lt>[email protected]<gt>
76
77 =head1 COPYRIGHT AND LICENSE
78
79 Copyright (C) 2013 by UNINETT Norid AS
80
81 This library is free software; you can redistribute it and/or modify
82 it under the same terms as Perl itself, either Perl version 5.14.2 or,
83 at your option, any later version of Perl 5 you may have available.
84
85 =cut