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

filter: Statementstmt 0.0% 0 / 28 Branchbran 0.0% 0 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 8 Podpod 0.0% 0 / 2 totaltotal 0.0% 0 / 40 CC 2 SCAR 10.6
CC
2
Cov
0%
from_bytes_inner
6.0
new
2.0
BEGIN
2.0
CRAP 2.9
1 #!/bin/false
2 # ABSTRACT: Rapid Commit option (code 14) -- zero-length data
3 # PODNAME: Net::DHCPv6::Option::RapidCommit
4 use strictures 2;
5  
6 package Net::DHCPv6::Option::RapidCommit;
7 $Net::DHCPv6::Option::RapidCommit::VERSION = '0.002';
8 use Net::DHCPv6::OptionList;
9 use Net::DHCPv6::Constants;
10 use Net::DHCPv6::X::BadOption;
11 use parent 'Net::DHCPv6::Option';
12 use namespace::clean;
13  
14 sub new {
15 my ( $class, %args ) = @_;
16 $args{code} = $OPTION_RAPID_COMMIT;
17 my $self = $class->SUPER::new( code => $args{code} );
18 return bless $self, $class;
19 }
20  
21 sub from_bytes_inner {
22 my ( $class, $code, $payload ) = @_;
23 Net::DHCPv6::X::BadOption->throw( message => 'RapidCommit option must be empty' )
24 if CORE::length( $payload ) > 0;
25 return $class->new;
26 }
27  
28 $Net::DHCPv6::OptionList::OPTION_CLASS{$OPTION_RAPID_COMMIT} = __PACKAGE__;
29  
30 1;
31  
32 __END__