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
|
|
|
|
|
7
|
version => 0.01, |
17
|
1
|
|
|
1
|
|
9
|
base => 'Badger::Codec'; |
|
1
|
|
|
|
|
2
|
|
18
|
|
|
|
|
|
|
|
19
|
1
|
|
|
1
|
|
6
|
use Badger::Timestamp 'Timestamp'; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
11
|
|
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
sub encode { |
23
|
1
|
|
|
1
|
1
|
2
|
my $self = shift; |
24
|
1
|
|
|
|
|
13
|
return Timestamp(@_)->timestamp; |
25
|
|
|
|
|
|
|
} |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
sub decode { |
29
|
2
|
|
|
2
|
1
|
6
|
my $self = shift; |
30
|
2
|
|
|
|
|
13
|
return Timestamp(@_); |
31
|
|
|
|
|
|
|
} |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
1; |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
__END__ |