lib/Net/DHCPv6/Option/NewPosixTimezone.pm

filter: Statementstmt 100% 28 / 28 Branchbran 100% 2 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 8 / 8 Podpod 100% 3 / 3 totaltotal 100% 41 / 41 CC 2 SCAR 2.0
CC
2
Cov
100%
new
2.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.2
« lib/Net/DHCPv6/Option/SolMaxRt.pm ↑ Summary lib/Net/DHCPv6/Option/NewTzdbTimezone.pm »
1 #!/usr/bin/false
2 # ABSTRACT: NEW_POSIX_TIMEZONE option (code 41) — POSIX timezone string
3 # PODNAME: Net::DHCPv6::Option::NewPosixTimezone
4 package Net::DHCPv6::Option::NewPosixTimezone;
5 15 $Net::DHCPv6::Option::NewPosixTimezone::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 parent 'Net::DHCPv6::Option';
Subroutine BEGIN: called CC=1 SCAR=0.0
10 15 ▶use namespace::clean;
Subroutine BEGIN: called CC=1 SCAR=0.0
11  
12 sub new {
13 3 ▶ my ( $class, %args ) = @_;
Subroutine new: called CC=2 SCAR=6.9
Pod documented
14 3 ▶ croak 'NewPosixTimezone requires tz_string' unless defined $args{tz_string};
Branch: 1 branch
BranchTrueFalseTotal
unless defined $args{"tz_string"} 1 2 3
15 2 $args{code} = $OPTION_NEW_POSIX_TIMEZONE;
16 2 $args{data} = $args{tz_string};
17 2 my $self = $class->SUPER::new( %args );
18 2 $self->{tz_string} = $args{tz_string};
19 2 bless $self, $class;
20 }
21  
22 2 ▶sub tz_string { shift->{tz_string} }
Subroutine tz_string: called CC=1 SCAR=0.0
Pod documented
23  
24 sub from_bytes_inner {
25 1 ▶ my ( $class, $code, $data ) = @_;
Subroutine from_bytes_inner: called CC=1 SCAR=0.0
Pod documented
26 1 return $class->new( tz_string => $data );
27 }
28  
29 15 $Net::DHCPv6::OptionList::OPTION_CLASS{$OPTION_NEW_POSIX_TIMEZONE} = __PACKAGE__;
30 15 1;
31  
32 __END__
« lib/Net/DHCPv6/Option/SolMaxRt.pm ↑ Summary lib/Net/DHCPv6/Option/NewTzdbTimezone.pm »