Date/Format.pm

filter: Statementstmt 80.9% 17 / 21 Branchbran 100% 2 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 66.6% 4 / 6 Podpod 100% 4 / 4 totaltotal 81.8% 27 / 33 CC 2 SCAR 4.5
CC
2
Cov
83%
time2str
2.0
ctime
2.0
asctime
2.0
CRAP 1.6
« Date/Format/Generic.pm ↑ Summary Date/Language/Bulgarian.pm »
1 # Copyright (c) 1995-2009 Graham Barr. This program is free
2 # software; you can redistribute it and/or modify it under the same terms
3 # as Perl itself.
4  
5 package Date::Format;
6  
7 14 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
8 14 require Exporter;
9  
10 14 our $VERSION = '2.35'; # VERSION: generated
11 # ABSTRACT: Date formatting subroutines
12  
13 14 ▶use Date::Format::Generic;
Subroutine BEGIN: called CC=1 SCAR=0.0
14  
15 14 our @ISA = qw(Exporter);
16 14 our @EXPORT = qw(time2str strftime ctime asctime);
17  
18 sub time2str ($;$$$)
19 163 ▶{
Subroutine time2str: called CC=2 SCAR=6.9
Pod documented
20 163 my ($fmt, $time, $zone, $lang) = @_;
21 my $pkg = defined $lang
22 163 ▶ ? do { require Date::Language; Date::Language->new($lang) }
Branch: 1 branch
BranchTrueFalseTotal
defined $lang ? : 6 157 163
23 : 'Date::Format::Generic';
24 163 $pkg->time2str($fmt, $time, $zone);
25 }
26  
27 sub strftime ($\@;$)
28 5 ▶{
Subroutine strftime: called CC=1 SCAR=0.0
Pod documented
29 5 Date::Format::Generic->strftime(@_);
30 }
31  
32 sub ctime ($;$)
33 0 ▶{
Subroutine ctime: not called CC=1 SCAR=6.9
Pod documented
34 0 my ($t,$tz) = @_;
35 0 Date::Format::Generic->time2str("%a %b %e %T %Y\n", $t, $tz);
36 }
37  
38 sub asctime (\@;$)
39 0 ▶{
Subroutine asctime: not called CC=1 SCAR=6.9
Pod documented
40 0 my ($t,$tz) = @_;
41 0 Date::Format::Generic->strftime("%a %b %e %T %Y\n", $t, $tz);
42 }
43  
44 14 1;
45  
46 __END__
« Date/Format/Generic.pm ↑ Summary Date/Language/Bulgarian.pm »