| 1 | |||||||||||||||||||||||||||||
| 2 | ############################################################################### | ||||||||||||||||||||||||||||
| 3 | ## ## | ||||||||||||||||||||||||||||
| 4 | ## Copyright (c) 1995 - 2015 by Steffen Beyer. ## | ||||||||||||||||||||||||||||
| 5 | ## All rights reserved. ## | ||||||||||||||||||||||||||||
| 6 | ## ## | ||||||||||||||||||||||||||||
| 7 | ## This package is free software; you can redistribute it ## | ||||||||||||||||||||||||||||
| 8 | ## and/or modify it under the same terms as Perl itself. ## | ||||||||||||||||||||||||||||
| 9 | ## ## | ||||||||||||||||||||||||||||
| 10 | ############################################################################### | ||||||||||||||||||||||||||||
| 11 | |||||||||||||||||||||||||||||
| 12 | package Date::Calc; | ||||||||||||||||||||||||||||
| 13 | |||||||||||||||||||||||||||||
| 14 | 50 | ▶ | use strict; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 15 | 50 | ▶ | use vars qw($XS_OK $XS_DISABLE @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS $VERSION); | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 16 | |||||||||||||||||||||||||||||
| 17 | BEGIN # Re-export imports from Date::Calc::XS or Date::Calc::PP: | ||||||||||||||||||||||||||||
| 18 | 50 | ▶ | { | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=6 SCAR=25.3
| |||||||||||||||||||||||||||||
| 19 | 50 | require Exporter; | |||||||||||||||||||||||||||
| 20 | 50 | @ISA = qw(Exporter); | |||||||||||||||||||||||||||
| 21 | 50 | $XS_OK = 0; | |||||||||||||||||||||||||||
| 22 | 50 | ▶ | unless ($XS_DISABLE and $XS_DISABLE) # prevent warning "used only once" | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%1/3
$Date::Calc::XS_DISABLE and $Date::Calc::XS_DISABLE
MC/DC0%0/2
$Date::Calc::XS_DISABLE and $Date::Calc::XS_DISABLE
$Date::Calc::XS_DISABLE
$Date::Calc::XS_DISABLE
Truth table33%1/3
A and B
A= $Date::Calc::XS_DISABLEB= $Date::Calc::XS_DISABLE
| |||||||||||||||||||||||||||||
| 23 | { | ||||||||||||||||||||||||||||
| 24 | eval | ||||||||||||||||||||||||||||
| 25 | 0 | { | |||||||||||||||||||||||||||
| 26 | 0 | require Date::Calc::XS; | |||||||||||||||||||||||||||
| 27 | 0 | @EXPORT = (@Date::Calc::XS::EXPORT); | |||||||||||||||||||||||||||
| 28 | 0 | @EXPORT_OK = (@Date::Calc::XS::EXPORT_OK); | |||||||||||||||||||||||||||
| 29 | 0 | %EXPORT_TAGS = (all => [@EXPORT_OK]); | |||||||||||||||||||||||||||
| 30 | 0 | Date::Calc::XS->import(@EXPORT,@EXPORT_OK); | |||||||||||||||||||||||||||
| 31 | }; | ||||||||||||||||||||||||||||
| 32 | 0 | ▶ | if ($@) { die $@ unless ($@ =~ /^Can't locate .*? at /); } | ||||||||||||||||||||||||||
|
Branch: 2 branches
| |||||||||||||||||||||||||||||
| 33 | 0 | else { $XS_OK = 1; } | |||||||||||||||||||||||||||
| 34 | } | ||||||||||||||||||||||||||||
| 35 | 50 | ▶ | unless ($XS_OK) | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 36 | { | ||||||||||||||||||||||||||||
| 37 | 50 | require Date::Calc::PP; | |||||||||||||||||||||||||||
| 38 | 50 | @EXPORT = (@Date::Calc::PP::EXPORT); | |||||||||||||||||||||||||||
| 39 | 50 | @EXPORT_OK = (@Date::Calc::PP::EXPORT_OK); | |||||||||||||||||||||||||||
| 40 | 50 | %EXPORT_TAGS = (all => [@EXPORT_OK]); | |||||||||||||||||||||||||||
| 41 | 50 | Date::Calc::PP->import(@EXPORT,@EXPORT_OK); | |||||||||||||||||||||||||||
| 42 | } | ||||||||||||||||||||||||||||
| 43 | } | ||||||||||||||||||||||||||||
| 44 | |||||||||||||||||||||||||||||
| 45 | ################################################## | ||||||||||||||||||||||||||||
| 46 | ## ## | ||||||||||||||||||||||||||||
| 47 | ## "Version()" is available but not exported ## | ||||||||||||||||||||||||||||
| 48 | ## in order to avoid possible name clashes. ## | ||||||||||||||||||||||||||||
| 49 | ## Call with "Date::Calc::Version()" instead! ## | ||||||||||||||||||||||||||||
| 50 | ## ## | ||||||||||||||||||||||||||||
| 51 | ################################################## | ||||||||||||||||||||||||||||
| 52 | |||||||||||||||||||||||||||||
| 53 | 50 | $VERSION = '6.4'; | |||||||||||||||||||||||||||
| 54 | |||||||||||||||||||||||||||||
| 55 | 1 | ▶ | sub Version { return $VERSION; } | ||||||||||||||||||||||||||
|
Subroutine
Version: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||||||||||||||||||||
| 56 | |||||||||||||||||||||||||||||
| 57 | 50 | 1; | |||||||||||||||||||||||||||
| 58 | |||||||||||||||||||||||||||||
| 59 | __END__ | ||||||||||||||||||||||||||||