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   107392 use strict;
  2         3  
  2         56  
4            
5 2     2   6 use vars qw($VERSION @ISA);
  2         2  
  2         88  
6            
7             $VERSION = '0.13';
8            
9 2     2   658 use DateTime;
  2         86872  
  2         39  
10 2     2   678 use DateTime::Format::Epoch;
  2         3  
  2         131  
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 17 my $class = shift;
18            
19 6         26 return $class->SUPER::new( epoch => $epoch,
20             unit => 'seconds',
21             type => 'int',
22             skip_leap_seconds => 1 );
23             }
24            
25             1;
26             __END__