| 1 | #!/usr/bin/false | ||||||||||||
| 2 | # ABSTRACT: Subscriber ID option (code 38) — opaque subscriber identification | ||||||||||||
| 3 | # PODNAME: Net::DHCPv6::Option::SubscriberId | ||||||||||||
| 4 | package Net::DHCPv6::Option::SubscriberId; | ||||||||||||
| 5 | 15 | $Net::DHCPv6::Option::SubscriberId::VERSION = '0.001'; | |||||||||||
| 6 | 15 | ▶ | use strictures 2; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 7 | 15 | ▶ | use Carp qw(croak); | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 8 | 15 | ▶ | use Net::DHCPv6::Constants; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 9 | 15 | ▶ | use parent 'Net::DHCPv6::Option'; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 10 | 15 | ▶ | use namespace::clean; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 11 | |||||||||||||
| 12 | sub new { | ||||||||||||
| 13 | 3 | ▶ | my ( $class, %args ) = @_; | ||||||||||
|
Subroutine
new: called CC=2 SCAR=6.9
Pod
documented
| |||||||||||||
| 14 | 3 | ▶ | my $subscriber_id = $args{subscriber_id} // ''; | ||||||||||
|
Condition100%2/2
$args{"subscriber_id"} // ""
MC/DC100%1/1
$args{"subscriber_id"} // ""
$args{"subscriber_id"}
Truth table100%2/2
A
A= $args{"subscriber_id"}
| |||||||||||||
| 15 | 3 | $args{code} = $OPTION_SUBSCRIBER_ID; | |||||||||||
| 16 | 3 | $args{data} = $subscriber_id; | |||||||||||
| 17 | 3 | my $self = $class->SUPER::new( %args ); | |||||||||||
| 18 | 3 | $self->{subscriber_id} = $subscriber_id; | |||||||||||
| 19 | 3 | bless $self, $class; | |||||||||||
| 20 | } | ||||||||||||
| 21 | |||||||||||||
| 22 | 3 | ▶ | sub subscriber_id { shift->{subscriber_id} } | ||||||||||
|
Subroutine
subscriber_id: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||||
| 23 | |||||||||||||
| 24 | sub from_bytes_inner { | ||||||||||||
| 25 | 1 | ▶ | my ( $class, $code, $data ) = @_; | ||||||||||
|
Subroutine
from_bytes_inner: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||||
| 26 | 1 | return $class->new( subscriber_id => $data ); | |||||||||||
| 27 | } | ||||||||||||
| 28 | |||||||||||||
| 29 | 15 | $Net::DHCPv6::OptionList::OPTION_CLASS{$OPTION_SUBSCRIBER_ID} = __PACKAGE__; | |||||||||||
| 30 | 15 | 1; | |||||||||||
| 31 | |||||||||||||
| 32 | __END__ | ||||||||||||