line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Stream::Buffered::File; |
2
|
2
|
|
|
2
|
|
14
|
use strict; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
91
|
|
3
|
2
|
|
|
2
|
|
12
|
use warnings; |
|
2
|
|
|
|
|
14
|
|
|
2
|
|
|
|
|
67
|
|
4
|
2
|
|
|
2
|
|
12
|
use base 'Stream::Buffered'; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
203
|
|
5
|
|
|
|
|
|
|
|
6
|
2
|
|
|
2
|
|
12
|
use IO::File; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
1509
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
sub new { |
9
|
4
|
|
|
4
|
0
|
12
|
my $class = shift; |
10
|
|
|
|
|
|
|
|
11
|
4
|
|
|
|
|
924
|
my $fh = IO::File->new_tmpfile; |
12
|
4
|
|
|
|
|
25
|
$fh->binmode; |
13
|
|
|
|
|
|
|
|
14
|
4
|
|
|
|
|
73
|
bless { fh => $fh }, $class; |
15
|
|
|
|
|
|
|
} |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
sub print { |
18
|
4
|
|
|
4
|
0
|
12
|
my $self = shift; |
19
|
4
|
|
|
|
|
37
|
$self->{fh}->print(@_); |
20
|
|
|
|
|
|
|
} |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
sub size { |
23
|
4
|
|
|
4
|
0
|
28
|
my $self = shift; |
24
|
4
|
|
|
|
|
178
|
$self->{fh}->flush; |
25
|
4
|
|
|
|
|
49
|
-s $self->{fh}; |
26
|
|
|
|
|
|
|
} |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
sub rewind { |
29
|
4
|
|
|
4
|
0
|
8
|
my $self = shift; |
30
|
4
|
|
|
|
|
28
|
$self->{fh}->seek(0, 0); |
31
|
4
|
|
|
|
|
42
|
$self->{fh}; |
32
|
|
|
|
|
|
|
} |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
1; |