File Coverage

blib/lib/DateTime/Format/Epoch/Unix.pm
Criterion Covered Total %
statement 14 14 100.0
branch n/a
condition n/a
subroutine 5 5 100.0
pod 1 1 100.0
total 20 20 100.0


line stmt bran cond sub pod time code
1             package DateTime::Format::Epoch::Unix;
2            
3 2     2   116712 use strict;
  2         2  
  2         60  
4            
5 2     2   6 use vars qw($VERSION @ISA);
  2         2  
  2         94  
6            
7             $VERSION = '0.13';
8            
9 2     2   712 use DateTime;
  2         96947  
  2         53  
10 2     2   790 use DateTime::Format::Epoch;
  2         5  
  2         135  
11            
12             @ISA = qw/DateTime::Format::Epoch/;
13            
14             my $epoch = DateTime->new( year => 1970, month => 1, day => 1 );
15            
16             sub new {
17 6     6 1 15 my $class = shift;
18            
19 6         25 return $class->SUPER::new( epoch => $epoch,
20             unit => 'seconds',
21             type => 'int',
22             skip_leap_seconds => 1 );
23             }
24            
25             1;
26             __END__