blib/lib/Net/DHCPv6/Option/SubscriberId.pm untested

filter: Statementstmt 0.0% 0 / 29 Branchbran n/a Conditioncond 0.0% 0 / 3 MC/DCmcdc n/a Subroutinesub 0.0% 0 / 8 Podpod 0.0% 0 / 3 totaltotal 0.0% 0 / 43 CC 1 SCAR 6.9
CC
1
Cov
0%
new
2.0
subscriber_id
2.0
from_bytes_inner
2.0
CRAP 2.0
1 #!/bin/false
2 # ABSTRACT: Subscriber ID option (code 38) -- opaque subscriber identification
3 # PODNAME: Net::DHCPv6::Option::SubscriberId
4 use strictures 2;
5  
6 package Net::DHCPv6::Option::SubscriberId;
7 $Net::DHCPv6::Option::SubscriberId::VERSION = '0.002';
8 use Net::DHCPv6::OptionList;
9 use Net::DHCPv6::Constants;
10 use parent 'Net::DHCPv6::Option';
11 use namespace::clean;
12 my $EMPTY = q();
13  
14 sub new {
15 my ( $class, %args ) = @_;
16 my $subscriber_id = $args{subscriber_id} // $EMPTY;
17 $args{code} = $OPTION_SUBSCRIBER_ID;
18 $args{data} = $subscriber_id;
19 my $self = $class->SUPER::new( %args );
20 $self->{subscriber_id} = $subscriber_id;
21 return bless $self, $class;
22 }
23  
24 sub subscriber_id { return shift->{subscriber_id} }
25  
26 sub from_bytes_inner {
27 my ( $class, $code, $payload ) = @_;
28 return $class->new( subscriber_id => $payload );
29 }
30  
31 $Net::DHCPv6::OptionList::OPTION_CLASS{$OPTION_SUBSCRIBER_ID} = __PACKAGE__;
32 1;
33  
34 __END__