line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Net::DNS::RR::PTR; |
2
|
|
|
|
|
|
|
|
3
|
4
|
|
|
4
|
|
37
|
use strict; |
|
4
|
|
|
|
|
8
|
|
|
4
|
|
|
|
|
135
|
|
4
|
4
|
|
|
4
|
|
28
|
use warnings; |
|
4
|
|
|
|
|
16
|
|
|
4
|
|
|
|
|
188
|
|
5
|
|
|
|
|
|
|
our $VERSION = (qw$Id: PTR.pm 1896 2023-01-30 12:59:25Z willem $)[2]; |
6
|
|
|
|
|
|
|
|
7
|
4
|
|
|
4
|
|
33
|
use base qw(Net::DNS::RR); |
|
4
|
|
|
|
|
8
|
|
|
4
|
|
|
|
|
311
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
=head1 NAME |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
Net::DNS::RR::PTR - DNS PTR resource record |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
=cut |
15
|
|
|
|
|
|
|
|
16
|
4
|
|
|
4
|
|
33
|
use integer; |
|
4
|
|
|
|
|
7
|
|
|
4
|
|
|
|
|
32
|
|
17
|
|
|
|
|
|
|
|
18
|
4
|
|
|
4
|
|
138
|
use Net::DNS::DomainName; |
|
4
|
|
|
|
|
7
|
|
|
4
|
|
|
|
|
1274
|
|
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
sub _decode_rdata { ## decode rdata from wire-format octet string |
22
|
3
|
|
|
3
|
|
9
|
my ( $self, @argument ) = @_; |
23
|
|
|
|
|
|
|
|
24
|
3
|
|
|
|
|
14
|
$self->{ptrdname} = Net::DNS::DomainName1035->decode(@argument); |
25
|
3
|
|
|
|
|
8
|
return; |
26
|
|
|
|
|
|
|
} |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
sub _encode_rdata { ## encode rdata as wire-format octet string |
30
|
6
|
|
|
6
|
|
24
|
my ( $self, @argument ) = @_; |
31
|
|
|
|
|
|
|
|
32
|
6
|
|
|
|
|
62
|
my $ptrdname = $self->{ptrdname}; |
33
|
6
|
|
|
|
|
21
|
return $ptrdname->encode(@argument); |
34
|
|
|
|
|
|
|
} |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
sub _format_rdata { ## format rdata portion of RR string. |
38
|
4
|
|
|
4
|
|
6
|
my $self = shift; |
39
|
|
|
|
|
|
|
|
40
|
4
|
|
|
|
|
7
|
my $ptrdname = $self->{ptrdname}; |
41
|
4
|
|
|
|
|
10
|
return $ptrdname->string; |
42
|
|
|
|
|
|
|
} |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
sub _parse_rdata { ## populate RR from rdata in argument list |
46
|
2
|
|
|
2
|
|
8
|
my ( $self, @argument ) = @_; |
47
|
|
|
|
|
|
|
|
48
|
2
|
|
|
|
|
7
|
$self->ptrdname(@argument); |
49
|
2
|
|
|
|
|
6
|
return; |
50
|
|
|
|
|
|
|
} |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
sub ptrdname { |
54
|
5
|
|
|
5
|
1
|
17
|
my ( $self, @value ) = @_; |
55
|
5
|
|
|
|
|
10
|
for (@value) { $self->{ptrdname} = Net::DNS::DomainName1035->new($_) } |
|
3
|
|
|
|
|
14
|
|
56
|
5
|
100
|
|
|
|
30
|
return $self->{ptrdname} ? $self->{ptrdname}->name : undef; |
57
|
|
|
|
|
|
|
} |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
1; |
61
|
|
|
|
|
|
|
__END__ |