File Coverage

lib/Badger/Codec/Timestamp.pm
Criterion Covered Total %
statement 10 10 100.0
branch n/a
condition n/a
subroutine 4 4 100.0
pod 2 2 100.0
total 16 16 100.0


line stmt bran cond sub pod time code
1             #========================================================================
2             #
3             # Badger::Codec::Timestamp
4             #
5             # DESCRIPTION
6             # Codec module for encoding/decoding a timestamp via Badger::Timestamp
7             #
8             # AUTHOR
9             # Andy Wardley
10             #
11             #========================================================================
12              
13             package Badger::Codec::Timestamp;
14              
15             use Badger::Class
16 1         6 version => 0.01,
17 1     1   7 base => 'Badger::Codec';
  1         1  
18              
19 1     1   5 use Badger::Timestamp 'Timestamp';
  1         3  
  1         8  
20              
21              
22             sub encode {
23 1     1 1 2 my $self = shift;
24 1         2 return Timestamp(@_)->timestamp;
25             }
26              
27              
28             sub decode {
29 2     2 1 4 my $self = shift;
30 2         6 return Timestamp(@_);
31             }
32              
33              
34             1;
35              
36              
37             __END__