| 1 | package Date::Manip; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2 | # Copyright (c) 2010-2026 Sullivan Beck. All rights reserved. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3 | # This program is free software; you can redistribute it and/or modify it | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4 | # under the same terms as Perl itself. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 6 | ########################################################################### | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 7 | ########################################################################### | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 8 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 9 | 206 | ▶ | use warnings; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 10 | 206 | ▶ | use strict; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 11 | 206 | ▶ | use Exporter; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 12 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 13 | 206 | our $VERSION; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 14 | 206 | $VERSION='7.00'; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 15 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 16 | 206 | our (@ISA,@EXPORT); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 17 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 18 | 206 | my $backend; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 19 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 20 | 206 | ▶ | if ((exists $ENV{'DATE_MANIP'} && $ENV{'DATE_MANIP'} eq 'DM5') || | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 2 branches
Condition55%5/9
exists $ENV{"DATE_MANIP"} and $ENV{"DATE_MANIP"} eq "DM5" or defined $Date::Manip::Backend and $Date::Manip::Backend eq "DM5"
exists $ENV{"DATE_MANIP"} and $ENV{"DATE_MANIP"} eq "DM5"
defined $Date::Manip::Backend and $Date::Manip::Backend eq "DM5"
MC/DC25%1/4
exists $ENV{"DATE_MANIP"} and $ENV{"DATE_MANIP"} eq "DM5" or defined $Date::Manip::Backend and $Date::Manip::Backend eq "DM5"
exists $ENV{"DATE_MANIP"}
$ENV{"DATE_MANIP"} eq "DM5"
defined $Date::Manip::Backend
$Date::Manip::Backend eq "DM5"
Truth table28%2/7
A and B or C and D
A= exists $ENV{"DATE_MANIP"}B= $ENV{"DATE_MANIP"} eq "DM5"C= defined $Date::Manip::BackendD= $Date::Manip::Backend eq "DM5"
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 21 | (defined $Date::Manip::Backend && $Date::Manip::Backend eq 'DM5')) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 22 | 36 | $backend = 'Date::Manip::DM5'; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 23 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 24 | } elsif ($] >= 5.010) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 25 | 170 | $backend = 'Date::Manip::DM6'; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 26 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 27 | } else { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 28 | 0 | $backend = 'Date::Manip::DM5'; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 29 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 30 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 31 | 206 | my $backend_exp = $backend . "::EXPORT"; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 32 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 33 | 206 | my $flag = eval "require $backend; $backend->import(); return 'loaded';"; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 34 | 206 | ▶ | if (! $flag) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 35 | 0 | die "ERROR LOADING MODULE: $backend"; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 36 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 37 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 38 | { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 39 | 206 | ▶ | no strict 'refs'; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 40 | 206 | @EXPORT = @{ $backend_exp }; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 41 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 42 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 43 | 206 | unshift (@ISA, $backend); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 44 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 45 | 206 | 1; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 46 | # Local Variables: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 47 | # mode: cperl | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 48 | # indent-tabs-mode: nil | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 49 | # cperl-indent-level: 3 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 50 | # cperl-continued-statement-offset: 2 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 51 | # cperl-continued-brace-offset: 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 52 | # cperl-brace-offset: 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 53 | # cperl-brace-imaginary-offset: 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 54 | # cperl-label-offset: 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 55 | # End: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||