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 #!/usr/bin/false
2 # ABSTRACT: Rapid Commit option (code 14) — zero-length data
3 # PODNAME: Net::DHCPv6::Option::RapidCommit
4 package Net::DHCPv6::Option::RapidCommit;
5 $Net::DHCPv6::Option::RapidCommit::VERSION = '0.001';
6 use strictures 2;
7 use Carp qw(croak);
8 use Net::DHCPv6::Constants;
9 use Net::DHCPv6::X::BadOption;
10 use parent 'Net::DHCPv6::Option';
11 use namespace::clean;
12  
13 sub new {
14 my ( $class, %args ) = @_;
15 $args{code} = $OPTION_RAPID_COMMIT;
16 my $self = $class->SUPER::new( code => $args{code} );
17 bless $self, $class;
18 }
19  
20 sub from_bytes_inner {
21 my ( $class, $code, $data ) = @_;
22 Net::DHCPv6::X::BadOption->throw( message => 'RapidCommit option must be empty' )
23 if CORE::length( $data ) > 0;
24 return $class->new;
25 }
26  
27 $Net::DHCPv6::OptionList::OPTION_CLASS{$OPTION_RAPID_COMMIT} = __PACKAGE__;
28  
29 1;
30  
31 __END__