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