Calc.pm

filter: Statementstmt 67.8% 19 / 28 Branchbran 25.0% 2 / 8 Conditioncond 33.3% 1 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 100% 4 / 4 Podpod 100% 1 / 1 totaltotal 58.7% 27 / 46 CC 6 SCAR 21.6
CC
6
Cov
56%
BEGIN
12.6
BEGIN
1.0
BEGIN
1.0
CRAP 8.7
« Calendar.pm ↑ Summary Calendar/Profiles.pm »
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
BranchTrueFalseTotal
unless ($Date::Calc::XS_DISABLE and $Date::Calc::XS_DISABLE) 0 50 50
Condition33%1/3
$Date::Calc::XS_DISABLE and $Date::Calc::XS_DISABLE
!ll&&!rl&&r
0050
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
ABresult
0X0
100
111
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
BranchTrueFalseTotal
if ($@) { } 0 0 0
unless $@ =~ /^Can't locate .*? at / 0 0 0
33 0 else { $XS_OK = 1; }
34 }
35 50 ▶ unless ($XS_OK)
Branch: 1 branch
BranchTrueFalseTotal
unless ($Date::Calc::XS_OK) 50 0 50
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__
« Calendar.pm ↑ Summary Calendar/Profiles.pm »