| 1 | package Net::DNS::RR::HINFO; | ||||||||||
| 2 | |||||||||||
| 3 | 1 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 4 | 1 | ▶ | use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 5 | 1 | our $VERSION = (qw$Id: HINFO.pm 2003 2025-01-21 12:06:06Z willem $)[2]; | |||||||||
| 6 | |||||||||||
| 7 | 1 | ▶ | use base qw(Net::DNS::RR); | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 8 | |||||||||||
| 9 | |||||||||||
| 10 | =head1 NAME | ||||||||||
| 11 | |||||||||||
| 12 | Net::DNS::RR::HINFO - DNS HINFO resource record | ||||||||||
| 13 | |||||||||||
| 14 | =cut | ||||||||||
| 15 | |||||||||||
| 16 | 1 | ▶ | use integer; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 17 | |||||||||||
| 18 | 1 | ▶ | use Net::DNS::Text; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 19 | |||||||||||
| 20 | |||||||||||
| 21 | 1 | ▶ | sub _decode_rdata { ## decode rdata from wire-format octet string | ||||||||
|
Subroutine
_decode_rdata: called CC=1 SCAR=0.0
| |||||||||||
| 22 | 1 | my ( $self, $data, $offset ) = @_; | |||||||||
| 23 | |||||||||||
| 24 | 1 | ( $self->{cpu}, $offset ) = Net::DNS::Text->decode( $data, $offset ); | |||||||||
| 25 | 1 | ( $self->{os}, $offset ) = Net::DNS::Text->decode( $data, $offset ); | |||||||||
| 26 | 1 | return; | |||||||||
| 27 | } | ||||||||||
| 28 | |||||||||||
| 29 | |||||||||||
| 30 | 5 | ▶ | sub _encode_rdata { ## encode rdata as wire-format octet string | ||||||||
|
Subroutine
_encode_rdata: called CC=1 SCAR=0.0
| |||||||||||
| 31 | 5 | my $self = shift; | |||||||||
| 32 | |||||||||||
| 33 | 5 | return join '', $self->{cpu}->encode, $self->{os}->encode; | |||||||||
| 34 | } | ||||||||||
| 35 | |||||||||||
| 36 | |||||||||||
| 37 | 2 | ▶ | sub _format_rdata { ## format rdata portion of RR string. | ||||||||
|
Subroutine
_format_rdata: called CC=1 SCAR=0.0
| |||||||||||
| 38 | 2 | my $self = shift; | |||||||||
| 39 | |||||||||||
| 40 | 2 | return join ' ', $self->{cpu}->string, $self->{os}->string; | |||||||||
| 41 | } | ||||||||||
| 42 | |||||||||||
| 43 | |||||||||||
| 44 | 1 | ▶ | sub _parse_rdata { ## populate RR from rdata in argument list | ||||||||
|
Subroutine
_parse_rdata: called CC=1 SCAR=0.0
| |||||||||||
| 45 | 1 | my ( $self, @argument ) = @_; | |||||||||
| 46 | |||||||||||
| 47 | 1 | $self->cpu( shift @argument ); | |||||||||
| 48 | 1 | $self->os(@argument); | |||||||||
| 49 | 1 | return; | |||||||||
| 50 | } | ||||||||||
| 51 | |||||||||||
| 52 | |||||||||||
| 53 | 4 | ▶ | sub cpu { | ||||||||
|
Subroutine
cpu: called CC=3 SCAR=11.0
Pod
documented
| |||||||||||
| 54 | 4 | my ( $self, @value ) = @_; | |||||||||
| 55 | 4 | for (@value) { $self->{cpu} = Net::DNS::Text->new($_) } | |||||||||
| 56 | 4 | ▶ | return $self->{cpu} ? $self->{cpu}->value : undef; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 57 | } | ||||||||||
| 58 | |||||||||||
| 59 | |||||||||||
| 60 | 4 | ▶ | sub os { | ||||||||
|
Subroutine
os: called CC=3 SCAR=11.0
Pod
documented
| |||||||||||
| 61 | 4 | my ( $self, @value ) = @_; | |||||||||
| 62 | 4 | for (@value) { $self->{os} = Net::DNS::Text->new($_) } | |||||||||
| 63 | 4 | ▶ | return $self->{os} ? $self->{os}->value : undef; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 64 | } | ||||||||||
| 65 | |||||||||||
| 66 | |||||||||||
| 67 | 1 | 1; | |||||||||
| 68 | __END__ | ||||||||||