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

filter: Statementstmt 0.0% 0 / 28 Branchbran n/a Conditioncond 0.0% 0 / 6 MC/DCmcdc n/a Subroutinesub 0.0% 0 / 8 Podpod 0.0% 0 / 3 totaltotal 0.0% 0 / 45 CC 1 SCAR 6.9
CC
1
Cov
0%
new
2.0
message
2.0
from_bytes_inner
2.0
CRAP 2.0
1 #!/bin/false
2 # ABSTRACT: Relay Message option (code 9) -- encapsulated relay message
3 # PODNAME: Net::DHCPv6::Option::RelayMsg
4 use strictures 2;
5  
6 package Net::DHCPv6::Option::RelayMsg;
7 $Net::DHCPv6::Option::RelayMsg::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 $args{code} = $OPTION_RELAY_MSG;
17 $args{data} = $args{data} // ( $args{message} // $EMPTY );
18 my $self = $class->SUPER::new( %args );
19 $self->{message} = $args{data};
20 return bless $self, $class;
21 }
22  
23 sub message { return shift->{message} }
24  
25 sub from_bytes_inner {
26 my ( $class, $code, $payload ) = @_;
27 return $class->new( message => $payload );
28 }
29  
30 $Net::DHCPv6::OptionList::OPTION_CLASS{$OPTION_RELAY_MSG} = __PACKAGE__;
31 1;
32  
33 __END__