From: Alexey Tourbin Date: Fri, 18 Mar 2005 21:05:51 +0000 (+0300) Subject: simple optimization for SelectSaver X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=a399f54aa42608589fd1ea74b6eb5f6dc14c9622;p=p5sagit%2Fp5-mst-13.2.git simple optimization for SelectSaver Message-ID: <20050318180551.GA12596@solemn.turbinal.org> p4raw-id: //depot/perl@24064 --- diff --git a/lib/SelectSaver.pm b/lib/SelectSaver.pm index 08104f4..1207b88 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;