lib/Test2/Harness/UI/Util/DateTimeFormat.pm

filter: Statementstmt 62.5% 15 / 24 Branchbran 0.0% 0 / 8 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 80.0% 4 / 5 Podpod 0.0% 0 / 1 totaltotal 50.0% 19 / 38 CC 5 SCAR 28.4
CC
5
Cov
47%
DTF
30.0
BEGIN
1.0
BEGIN
1.0
CRAP 17.1
« lib/Test2/Harness/UI/Schema/Overlay/Coverage.pm ↑ Summary lib/Test2/Harness/UI/CPANImporter.pm »
1 package Test2::Harness::UI::Util::DateTimeFormat;
2 2 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 2 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
5 2 ▶use Carp qw/confess/;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 2 ▶use Importer Importer => 'import';
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 2 our @EXPORT = qw/DTF/;
9  
10 2 my $DTF;
11 0 ▶sub DTF {
Subroutine DTF: not called CC=5 SCAR=34.0
Pod undocumented
12 0 ▶ return $DTF if $DTF;
Branch: 1 branch
BranchTrueFalseTotal
if $DTF 0 0 0
13  
14 0 ▶ confess "You must first load a Test2::Harness::UI::Schema::NAME module"
Branch: 1 branch
BranchTrueFalseTotal
unless $Test2::Harness::UI::Schema::LOADED 0 0 0
15 unless $Test2::Harness::UI::Schema::LOADED;
16  
17 0 ▶ if ($Test2::Harness::UI::Schema::LOADED =~ m/postgresql/i) {
Branch: 1 branch
BranchTrueFalseTotal
if ($Test2::Harness::UI::Schema::LOADED =~ /postgresql/i) 0 0 0
18 0 require DateTime::Format::Pg;
19 0 return $DTF = 'DateTime::Format::Pg';
20 }
21  
22 0 ▶ if ($Test2::Harness::UI::Schema::LOADED =~ m/mysql/i) {
Branch: 1 branch
BranchTrueFalseTotal
if ($Test2::Harness::UI::Schema::LOADED =~ /mysql/i) 0 0 0
23 0 require DateTime::Format::MySQL;
24 0 return $DTF = 'DateTime::Format::MySQL';
25 }
26  
27 0 die "Not sure what DateTime::Formatter to use";
28 }
29  
30 2 1;
« lib/Test2/Harness/UI/Schema/Overlay/Coverage.pm ↑ Summary lib/Test2/Harness/UI/CPANImporter.pm »