line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package App::Timestamper::Filter::TS; |
2
|
|
|
|
|
|
|
$App::Timestamper::Filter::TS::VERSION = '0.2.0'; |
3
|
1
|
|
|
1
|
|
69343
|
use strict; |
|
1
|
|
|
|
|
8
|
|
|
1
|
|
|
|
|
22
|
|
4
|
1
|
|
|
1
|
|
4
|
use warnings; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
21
|
|
5
|
|
|
|
|
|
|
|
6
|
1
|
|
|
1
|
|
4
|
use Time::HiRes qw/time/; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
4
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
sub new |
9
|
|
|
|
|
|
|
{ |
10
|
1
|
|
|
1
|
1
|
75
|
return bless {}, shift; |
11
|
|
|
|
|
|
|
} |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
sub fh_filter |
14
|
|
|
|
|
|
|
{ |
15
|
1
|
|
|
1
|
1
|
3060
|
my ($self, $in, $out) = @_; |
16
|
|
|
|
|
|
|
|
17
|
1
|
|
|
|
|
5
|
while (my $l = <$in>) |
18
|
|
|
|
|
|
|
{ |
19
|
4
|
|
|
|
|
784
|
$out->(sprintf('%.9f', time()) . "\t" . $l); |
20
|
|
|
|
|
|
|
} |
21
|
|
|
|
|
|
|
|
22
|
1
|
|
|
|
|
237
|
return; |
23
|
|
|
|
|
|
|
} |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
1; |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
__END__ |