lib/Net/DHCPv6/Option/RelayMsg.pm

filter: Statementstmt 100% 28 / 28 Branchbran n/a Conditioncond 33.3% 2 / 6 MC/DCmcdc 0.0% 0 / 3 Subroutinesub 100% 8 / 8 Podpod 100% 3 / 3 totaltotal 85.4% 41 / 48 CC 3 SCAR 5.3
CC
3
Cov
88%
new
3.3
BEGIN
1.0
BEGIN
1.0
CRAP 1.7
« lib/Net/DHCPv6/Option/RSOO.pm ↑ Summary lib/Net/DHCPv6/Option/PdExclude.pm »
1 #!/bin/false
2 # ABSTRACT: Relay Message option (code 9) -- encapsulated relay message
3 # PODNAME: Net::DHCPv6::Option::RelayMsg
4 15 ▶use strictures 2;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 package Net::DHCPv6::Option::RelayMsg;
7 15 $Net::DHCPv6::Option::RelayMsg::VERSION = '0.003';
8 15 ▶use Net::DHCPv6::OptionList ();
Subroutine BEGIN: called CC=1 SCAR=0.0
9 15 ▶use Net::DHCPv6::Constants qw(
Subroutine BEGIN: called CC=1 SCAR=0.0
10 $OPTION_RELAY_MSG
11 15 );
12 15 ▶use parent 'Net::DHCPv6::Option';
Subroutine BEGIN: called CC=1 SCAR=0.0
13 15 ▶use namespace::clean;
Subroutine BEGIN: called CC=1 SCAR=0.0
14 15 my $EMPTY = q();
15  
16 3 ▶sub new {
Subroutine new: called CC=3 SCAR=12.0
Pod documented
17 3 my ( $class, %args ) = @_;
18 3 $args{code} = $OPTION_RELAY_MSG;
19 3 ▶ $args{data} = $args{data} // ( $args{message} // $EMPTY );
Condition33%2/6
$args{"data"} // ($args{"message"} // $EMPTY)
l!l&&r!l&&!r
030
$args{"message"} // $EMPTY
l!l&&r!l&&!r
300
MC/DC0%0/3
$args{"data"} // ($args{"message"} // $EMPTY)
$args{"data"} $args{"message"} $EMPTY
Truth table25%1/4
A // B // C
A= $args{"data"}B= $args{"message"}C= $EMPTY
ABCresult
1XX1
01X1
0011
0000
20 3 my $self = $class->SUPER::new( %args );
21 3 $self->{message} = $args{data};
22 3 return bless $self, $class;
23 }
24  
25 2 ▶sub message { return shift->{message} }
Subroutine message: called CC=1 SCAR=0.0
Pod documented
26  
27 2 ▶sub from_bytes_inner {
Subroutine from_bytes_inner: called CC=1 SCAR=0.0
Pod documented
28 2 my ( $class, $code, $payload ) = @_;
29 2 return $class->new( message => $payload );
30 }
31  
32 15 $Net::DHCPv6::OptionList::OPTION_CLASS{$OPTION_RELAY_MSG} = __PACKAGE__;
33 15 1;
34  
35 __END__
« lib/Net/DHCPv6/Option/RSOO.pm ↑ Summary lib/Net/DHCPv6/Option/PdExclude.pm »