lib/Net/DHCPv6/Option/SubscriberId.pm

filter: Statementstmt 100% 29 / 29 Branchbran n/a Conditioncond 66.6% 2 / 3 MC/DCmcdc 50.0% 1 / 2 Subroutinesub 100% 8 / 8 Podpod 100% 3 / 3 totaltotal 95.5% 43 / 45 CC 2 SCAR 2.0
CC
2
Cov
97%
new
2.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.2
« lib/Net/DHCPv6.pm ↑ Summary lib/Net/DHCPv6/Option/RapidCommit.pm »
1 #!/bin/false
2 # ABSTRACT: Subscriber ID option (code 38) -- opaque subscriber identification
3 # PODNAME: Net::DHCPv6::Option::SubscriberId
4 15 ▶use strictures 2;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 package Net::DHCPv6::Option::SubscriberId;
7 15 $Net::DHCPv6::Option::SubscriberId::VERSION = '0.002';
8 15 ▶use Net::DHCPv6::OptionList;
Subroutine BEGIN: called CC=1 SCAR=0.0
9 15 ▶use Net::DHCPv6::Constants;
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 15 my $EMPTY = q();
13  
14 sub new {
15 3 ▶ my ( $class, %args ) = @_;
Subroutine new: called CC=2 SCAR=7.0
Pod documented
16 3 ▶ my $subscriber_id = $args{subscriber_id} // $EMPTY;
Condition66%2/3
$args{"subscriber_id"} // $EMPTY
l!l&&r!l&&!r
201
MC/DC50%1/2
$args{"subscriber_id"} // $EMPTY
$args{"subscriber_id"} $EMPTY
Truth table66%2/3
A // B
A= $args{"subscriber_id"}B= $EMPTY
ABresult
1X1
011
000
17 3 $args{code} = $OPTION_SUBSCRIBER_ID;
18 3 $args{data} = $subscriber_id;
19 3 my $self = $class->SUPER::new( %args );
20 3 $self->{subscriber_id} = $subscriber_id;
21 3 return bless $self, $class;
22 }
23  
24 3 ▶sub subscriber_id { return shift->{subscriber_id} }
Subroutine subscriber_id: called CC=1 SCAR=0.0
Pod documented
25  
26 sub from_bytes_inner {
27 1 ▶ my ( $class, $code, $payload ) = @_;
Subroutine from_bytes_inner: called CC=1 SCAR=0.0
Pod documented
28 1 return $class->new( subscriber_id => $payload );
29 }
30  
31 15 $Net::DHCPv6::OptionList::OPTION_CLASS{$OPTION_SUBSCRIBER_ID} = __PACKAGE__;
32 15 1;
33  
34 __END__
« lib/Net/DHCPv6.pm ↑ Summary lib/Net/DHCPv6/Option/RapidCommit.pm »