Perlito5X/Time/localtime.pm untested

filter: Statementstmt 0.0% 0 / 29 Branchbran 0.0% 0 / 6 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 9 Podpod 0.0% 0 / 4 totaltotal 0.0% 0 / 48 CC 4 SCAR 13.9
CC
4
Cov
0%
populate
6.0
localtime
6.0
ctime
6.0
CRAP 4.0
1 package Time::localtime;
2 use strict;
3 use 5.006_001;
4  
5 use Time::tm;
6  
7 our(@ISA, @EXPORT, @EXPORT_OK, %EXPORT_TAGS, $VERSION);
8 BEGIN {
9 use Exporter ();
10 @ISA = qw(Exporter Time::tm);
11 @EXPORT = qw(localtime ctime);
12 @EXPORT_OK = qw(
13 $tm_sec $tm_min $tm_hour $tm_mday
14 $tm_mon $tm_year $tm_wday $tm_yday
15 $tm_isdst
16 );
17 %EXPORT_TAGS = ( FIELDS => [ @EXPORT_OK, @EXPORT ] );
18 $VERSION = 1.02;
19 }
20 use vars @EXPORT_OK;
21  
22 sub populate (@) {
23 return unless @_;
24 my $tmob = Time::tm->new();
25 @$tmob = (
26 $tm_sec, $tm_min, $tm_hour, $tm_mday,
27 $tm_mon, $tm_year, $tm_wday, $tm_yday,
28 $tm_isdst )
29 = @_;
30 return $tmob;
31 }
32  
33 sub localtime (;$) { populate CORE::localtime(@_ ? shift : time)}
34 sub ctime (;$) { scalar CORE::localtime(@_ ? shift : time) }
35  
36 1;
37  
38 __END__