| 1 | 2 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 2 | 2 | ▶ | use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 3 | |||||||||||
| 4 | package Net::NBName::NameQuery::RR; | ||||||||||
| 5 | |||||||||||
| 6 | 2 | ▶ | use vars '$VERSION'; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 7 | 2 | $VERSION = "0.26"; | |||||||||
| 8 | |||||||||||
| 9 | 2 | ▶ | use vars '@nodetypes'; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 10 | 2 | @nodetypes = qw/B-node P-node M-node H-node/; | |||||||||
| 11 | |||||||||||
| 12 | sub new | ||||||||||
| 13 | 3 | ▶ | { | ||||||||
|
Subroutine
new: called CC=2 SCAR=6.9
Pod
undocumented
| |||||||||||
| 14 | 3 | my $class = shift; | |||||||||
| 15 | 3 | my $nb_data = shift; | |||||||||
| 16 | 3 | my ($flags, $packed_address) = unpack("na4", $nb_data); | |||||||||
| 17 | 3 | my $address = join ".", unpack("C4", $packed_address); | |||||||||
| 18 | |||||||||||
| 19 | 3 | my $self = {}; | |||||||||
| 20 | 3 | $self->{'address'} = $address; | |||||||||
| 21 | 3 | ▶ | $self->{'G'} = ($flags & 2**15) ? "GROUP" : "UNIQUE"; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 22 | 3 | $self->{'ONT'} = $nodetypes[($flags >> 13) & 3]; | |||||||||
| 23 | |||||||||||
| 24 | 3 | bless $self, $class; | |||||||||
| 25 | 3 | return $self; | |||||||||
| 26 | } | ||||||||||
| 27 | |||||||||||
| 28 | sub as_string | ||||||||||
| 29 | 0 | ▶ | { | ||||||||
|
Subroutine
as_string: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 30 | 0 | my $self = shift; | |||||||||
| 31 | |||||||||||
| 32 | return sprintf "%-15s %-6s %-6s\n", | ||||||||||
| 33 | $self->{'address'}, | ||||||||||
| 34 | $self->{'G'}, | ||||||||||
| 35 | 0 | $self->{'ONT'}; | |||||||||
| 36 | } | ||||||||||
| 37 | |||||||||||
| 38 | 3 | ▶ | sub address { return $_[0]->{'address'}; } | ||||||||
|
Subroutine
address: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||
| 39 | 0 | ▶ | sub G { return $_[0]->{'G'}; } | ||||||||
|
Subroutine
G: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 40 | 0 | ▶ | sub ONT { return $_[0]->{'ONT'}; } | ||||||||
|
Subroutine
ONT: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 41 | |||||||||||
| 42 | 2 | 1; | |||||||||
| 43 | |||||||||||
| 44 | __END__ | ||||||||||