| Filename | /usr/share/perl/5.28/SelectSaver.pm |
| Statements | Executed 7 statements in 192µs |
| Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
|---|---|---|---|---|---|
| 1 | 1 | 1 | 10µs | 35µs | SelectSaver::BEGIN@6 |
| 1 | 1 | 1 | 6µs | 28µs | SelectSaver::BEGIN@7 |
| 0 | 0 | 0 | 0s | 0s | SelectSaver::DESTROY |
| 0 | 0 | 0 | 0s | 0s | SelectSaver::new |
| Line | State ments |
Time on line |
Calls | Time in subs |
Code |
|---|---|---|---|---|---|
| 1 | package SelectSaver; | ||||
| 2 | |||||
| 3 | 1 | 400ns | our $VERSION = '1.02'; | ||
| 4 | |||||
| 5 | 1 | 6µs | require 5.000; | ||
| 6 | 2 | 21µs | 2 | 60µs | # spent 35µs (10+25) within SelectSaver::BEGIN@6 which was called:
# once (10µs+25µs) by IO::Handle::BEGIN@7 at line 6 # spent 35µs making 1 call to SelectSaver::BEGIN@6
# spent 25µs making 1 call to Exporter::import |
| 7 | 2 | 162µs | 2 | 50µs | # spent 28µs (6+22) within SelectSaver::BEGIN@7 which was called:
# once (6µs+22µs) by IO::Handle::BEGIN@7 at line 7 # spent 28µs making 1 call to SelectSaver::BEGIN@7
# spent 22µs making 1 call to Exporter::import |
| 8 | |||||
| 9 | sub new { | ||||
| 10 | @_ >= 1 && @_ <= 2 or croak 'usage: SelectSaver->new( [FILEHANDLE] )'; | ||||
| 11 | my $fh = select; | ||||
| 12 | my $self = bless \$fh, $_[0]; | ||||
| 13 | select qualify($_[1], caller) if @_ > 1; | ||||
| 14 | $self; | ||||
| 15 | } | ||||
| 16 | |||||
| 17 | sub DESTROY { | ||||
| 18 | my $self = $_[0]; | ||||
| 19 | select $$self; | ||||
| 20 | } | ||||
| 21 | |||||
| 22 | 1 | 3µs | 1; |