lib/Net/DHCPv6/Option/RapidCommit.pm

filter: Statementstmt 100% 28 / 28 Branchbran 100% 2 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 8 / 8 Podpod 100% 2 / 2 totaltotal 100% 40 / 40 CC 2 SCAR 2.0
CC
2
Cov
100%
from_bytes_inner
2.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.2
« lib/Net/DHCPv6/Option/NispDomainName.pm ↑ Summary lib/Net/DHCPv6/Option/SubscriberId.pm »
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 15 $Net::DHCPv6::Option::RapidCommit::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 Net::DHCPv6::X::BadOption;
Subroutine BEGIN: called CC=1 SCAR=0.0
10 15 ▶use parent 'Net::DHCPv6::Option';
Subroutine BEGIN: called CC=1 SCAR=0.0
11 15 ▶use namespace::clean;
Subroutine BEGIN: called CC=1 SCAR=0.0
12  
13 sub new {
14 3 ▶ my ( $class, %args ) = @_;
Subroutine new: called CC=1 SCAR=0.0
Pod documented
15 3 $args{code} = $OPTION_RAPID_COMMIT;
16 3 my $self = $class->SUPER::new( code => $args{code} );
17 3 bless $self, $class;
18 }
19  
20 sub from_bytes_inner {
21 3 ▶ my ( $class, $code, $data ) = @_;
Subroutine from_bytes_inner: called CC=2 SCAR=6.9
Pod documented
22 3 ▶ Net::DHCPv6::X::BadOption->throw( message => 'RapidCommit option must be empty' )
Branch: 1 branch
BranchTrueFalseTotal
if length $data > 0 1 2 3
23 if CORE::length( $data ) > 0;
24 2 return $class->new;
25 }
26  
27 15 $Net::DHCPv6::OptionList::OPTION_CLASS{$OPTION_RAPID_COMMIT} = __PACKAGE__;
28  
29 15 1;
30  
31 __END__
« lib/Net/DHCPv6/Option/NispDomainName.pm ↑ Summary lib/Net/DHCPv6/Option/SubscriberId.pm »