| 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
MC/DC0%0/2
ref $self || $self
ref $self
$self
Truth table0%0/3
A || B
A= ref $selfB= $self
| |||||||||||||||||||||
| 32 | |||||||||||||||||||||
| 33 | 0 | my $obj; | |||||||||||||||||||
| 34 | 0 | ▶ | if ( $class->isa(__PACKAGE__) ) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 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__ | ||||||||||||||||||||