Filename | /usr/local/share/perl/5.18.2/Stream/Buffered/File.pm |
Statements | Executed 9 statements in 178µs |
Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
---|---|---|---|---|---|
1 | 1 | 1 | 8µs | 17µs | BEGIN@2 | Stream::Buffered::File::
1 | 1 | 1 | 8µs | 108µs | BEGIN@6 | Stream::Buffered::File::
1 | 1 | 1 | 7µs | 10µs | BEGIN@3 | Stream::Buffered::File::
1 | 1 | 1 | 5µs | 52µs | BEGIN@4 | Stream::Buffered::File::
0 | 0 | 0 | 0s | 0s | new | Stream::Buffered::File::
0 | 0 | 0 | 0s | 0s | |
0 | 0 | 0 | 0s | 0s | rewind | Stream::Buffered::File::
0 | 0 | 0 | 0s | 0s | size | Stream::Buffered::File::
Line | State ments |
Time on line |
Calls | Time in subs |
Code |
---|---|---|---|---|---|
1 | package Stream::Buffered::File; | ||||
2 | 2 | 19µs | 2 | 26µs | # spent 17µs (8+9) within Stream::Buffered::File::BEGIN@2 which was called:
# once (8µs+9µs) by Stream::Buffered::BEGIN@7 at line 2 # spent 17µs making 1 call to Stream::Buffered::File::BEGIN@2
# spent 9µs making 1 call to strict::import |
3 | 2 | 21µs | 2 | 14µs | # spent 10µs (7+3) within Stream::Buffered::File::BEGIN@3 which was called:
# once (7µs+3µs) by Stream::Buffered::BEGIN@7 at line 3 # spent 10µs making 1 call to Stream::Buffered::File::BEGIN@3
# spent 3µs making 1 call to warnings::import |
4 | 2 | 21µs | 2 | 98µs | # spent 52µs (5+47) within Stream::Buffered::File::BEGIN@4 which was called:
# once (5µs+47µs) by Stream::Buffered::BEGIN@7 at line 4 # spent 52µs making 1 call to Stream::Buffered::File::BEGIN@4
# spent 47µs making 1 call to base::import |
5 | |||||
6 | 2 | 115µs | 2 | 208µs | # spent 108µs (8+100) within Stream::Buffered::File::BEGIN@6 which was called:
# once (8µs+100µs) by Stream::Buffered::BEGIN@7 at line 6 # spent 108µs making 1 call to Stream::Buffered::File::BEGIN@6
# spent 100µs making 1 call to Exporter::import |
7 | |||||
8 | sub new { | ||||
9 | my $class = shift; | ||||
10 | |||||
11 | my $fh = IO::File->new_tmpfile; | ||||
12 | $fh->binmode; | ||||
13 | |||||
14 | bless { fh => $fh }, $class; | ||||
15 | } | ||||
16 | |||||
17 | sub print { | ||||
18 | my $self = shift; | ||||
19 | $self->{fh}->print(@_); | ||||
20 | } | ||||
21 | |||||
22 | sub size { | ||||
23 | my $self = shift; | ||||
24 | $self->{fh}->flush; | ||||
25 | -s $self->{fh}; | ||||
26 | } | ||||
27 | |||||
28 | sub rewind { | ||||
29 | my $self = shift; | ||||
30 | $self->{fh}->seek(0, 0); | ||||
31 | $self->{fh}; | ||||
32 | } | ||||
33 | |||||
34 | 1 | 2µs | 1; |