| Filename | /usr/share/perl/5.10/SelectSaver.pm |
| Statements | Executed 9 statements in 221µs |
| Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
|---|---|---|---|---|---|
| 1 | 1 | 1 | 27µs | 98µs | SelectSaver::BEGIN@6 |
| 1 | 1 | 1 | 16µs | 92µ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 | 2µs | our $VERSION = '1.02'; | ||
| 4 | |||||
| 5 | 1 | 18µs | require 5.000; | ||
| 6 | 3 | 46µs | 2 | 169µs | # spent 98µs (27+71) within SelectSaver::BEGIN@6 which was called:
# once (27µs+71µs) by IO::File::BEGIN@10 at line 6 # spent 98µs making 1 call to SelectSaver::BEGIN@6
# spent 71µs making 1 call to Exporter::import |
| 7 | 3 | 150µs | 2 | 168µs | # spent 92µs (16+76) within SelectSaver::BEGIN@7 which was called:
# once (16µs+76µs) by IO::File::BEGIN@10 at line 7 # spent 92µs making 1 call to SelectSaver::BEGIN@7
# spent 76µ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 | 5µs | 1; |