TimeZone/Floating.pm

filter: Statementstmt 53.8% 14 / 26 Branchbran 0.0% 0 / 2 Conditioncond 0.0% 0 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 50.0% 4 / 8 Podpod 66.6% 2 / 3 totaltotal 45.4% 20 / 44 CC 3 SCAR 15.3
CC
3
Cov
45%
STORABLE_thaw
12.0
new
2.0
_new_instance
2.0
CRAP 4.6
« TimeZone/OlsonDB/Rule.pm ↑ Summary TimeZone/OffsetOnly.pm »
1 package DateTime::TimeZone::Floating;
2  
3 3 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 3 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 3 ▶use namespace::autoclean;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 3 our $VERSION = '2.72';
8  
9 3 ▶use parent 'Class::Singleton', 'DateTime::TimeZone::OffsetOnly';
Subroutine BEGIN: called CC=1 SCAR=0.0
10  
11 0 ▶sub new {
Subroutine new: not called CC=1 SCAR=6.9
Pod documented
12 0 return shift->instance;
13 }
14  
15 ## no critic (Subroutines::ProhibitUnusedPrivateSubroutines)
16 0 ▶sub _new_instance {
Subroutine _new_instance: not called CC=1 SCAR=6.9
17 0 my $class = shift;
18  
19 0 return bless {
20 name => 'floating',
21 offset => 0
22 }, $class;
23 }
24 ## use critic
25  
26 0 ▶sub is_floating {1}
Subroutine is_floating: not called CC=1 SCAR=6.9
Pod documented
27  
28 0 ▶sub STORABLE_thaw {
Subroutine STORABLE_thaw: not called CC=3 SCAR=24.8
Pod undocumented
29 0 my $self = shift;
30  
31 0 ▶ my $class = ref $self || $self;
Condition0%0/3
ref $self || $self
l!l&&r!l&&!r
000
MC/DC0%0/2
ref $self || $self
ref $self $self
Truth table0%0/3
A || B
A= ref $selfB= $self
ABresult
1X1
011
000
32  
33 0 my $obj;
34 0 ▶ if ( $class->isa(__PACKAGE__) ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($class->isa(__PACKAGE__)) { } 0 0 0
35 0 $obj = __PACKAGE__->new();
36 }
37 else {
38 0 $obj = $class->new();
39 }
40  
41 0 %$self = %$obj;
42  
43 0 return $self;
44 }
45  
46 3 1;
47  
48 # ABSTRACT: A time zone that is always local
49  
50 __END__
« TimeZone/OlsonDB/Rule.pm ↑ Summary TimeZone/OffsetOnly.pm »