| Filename | /home/doy/perl5/perlbrew/perls/perl-5.10.1/lib/5.10.1/SelectSaver.pm |
| Statements | Executed 9 statements in 573µs |
| Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
|---|---|---|---|---|---|
| 1 | 1 | 1 | 73µs | 287µs | SelectSaver::BEGIN@38 |
| 1 | 1 | 1 | 38µs | 233µs | SelectSaver::BEGIN@39 |
| 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 | 4µs | our $VERSION = '1.02'; | ||
| 4 | |||||
| 5 | =head1 NAME | ||||
| 6 | |||||
| - - | |||||
| 37 | 1 | 59µs | require 5.000; | ||
| 38 | 3 | 110µs | 2 | 501µs | # spent 287µs (73+214) within SelectSaver::BEGIN@38 which was called:
# once (73µs+214µs) by IO::Handle::BEGIN@265 at line 38 # spent 287µs making 1 call to SelectSaver::BEGIN@38
# spent 214µs making 1 call to Exporter::import |
| 39 | 3 | 387µs | 2 | 428µs | # spent 233µs (38+195) within SelectSaver::BEGIN@39 which was called:
# once (38µs+195µs) by IO::Handle::BEGIN@265 at line 39 # spent 233µs making 1 call to SelectSaver::BEGIN@39
# spent 195µs making 1 call to Exporter::import |
| 40 | |||||
| 41 | sub new { | ||||
| 42 | @_ >= 1 && @_ <= 2 or croak 'usage: SelectSaver->new( [FILEHANDLE] )'; | ||||
| 43 | my $fh = select; | ||||
| 44 | my $self = bless \$fh, $_[0]; | ||||
| 45 | select qualify($_[1], caller) if @_ > 1; | ||||
| 46 | $self; | ||||
| 47 | } | ||||
| 48 | |||||
| 49 | sub DESTROY { | ||||
| 50 | my $self = $_[0]; | ||||
| 51 | select $$self; | ||||
| 52 | } | ||||
| 53 | |||||
| 54 | 1 | 12µs | 1; |