diff options
author | Alexey Tourbin <at@altlinux.ru> | 2005-03-19 00:05:51 +0300 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2005-03-22 08:57:18 +0000 |
commit | a399f54aa42608589fd1ea74b6eb5f6dc14c9622 (patch) | |
tree | 42919fca186e942f015437b429b63bb29fc70191 /lib/SelectSaver.pm | |
parent | 46cea15777af239bf2c7798126b9919bc202efe7 (diff) | |
download | perl-a399f54aa42608589fd1ea74b6eb5f6dc14c9622.tar.gz |
simple optimization for SelectSaver
Message-ID: <20050318180551.GA12596@solemn.turbinal.org>
p4raw-id: //depot/perl@24064
Diffstat (limited to 'lib/SelectSaver.pm')
-rw-r--r-- | lib/SelectSaver.pm | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/SelectSaver.pm b/lib/SelectSaver.pm index 08104f47d4..1207b88a4a 100644 --- a/lib/SelectSaver.pm +++ b/lib/SelectSaver.pm @@ -1,6 +1,6 @@ package SelectSaver; -our $VERSION = '1.00'; +our $VERSION = '1.01'; =head1 NAME @@ -41,14 +41,14 @@ use Symbol; sub new { @_ >= 1 && @_ <= 2 or croak 'usage: new SelectSaver [FILEHANDLE]'; my $fh = select; - my $self = bless [$fh], $_[0]; + my $self = bless \$fh, $_[0]; select qualify($_[1], caller) if @_ > 1; $self; } sub DESTROY { - my $this = $_[0]; - select $$this[0]; + my $self = $_[0]; + select $$self; } 1; |