diff options
author | Ricardo SIGNES <rjbs@cpan.org> | 2009-01-20 18:32:17 -0500 |
---|---|---|
committer | Vincent Pit <vince@profvince.com> | 2009-01-21 16:54:16 +0100 |
commit | 2b393bf410d9f1bf0b80132c4e8b5d6707a139f8 (patch) | |
tree | fba97a93f415d38a8053cb90ef68b23c24b7de7e /lib/SelectSaver.pm | |
parent | 797f796a9610b63f252016d76732152c8ff9fb39 (diff) | |
download | perl-2b393bf410d9f1bf0b80132c4e8b5d6707a139f8.tar.gz |
now get non-dual lived code
Diffstat (limited to 'lib/SelectSaver.pm')
-rw-r--r-- | lib/SelectSaver.pm | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/SelectSaver.pm b/lib/SelectSaver.pm index 1207b88a4a..f0900a5a74 100644 --- a/lib/SelectSaver.pm +++ b/lib/SelectSaver.pm @@ -11,13 +11,13 @@ SelectSaver - save and restore selected file handle use SelectSaver; { - my $saver = new SelectSaver(FILEHANDLE); + my $saver = SelectSaver->new(FILEHANDLE); # FILEHANDLE is selected } # previous handle is selected { - my $saver = new SelectSaver; + my $saver = SelectSaver->new; # new handle may be selected, or not } # previous handle is selected @@ -39,7 +39,7 @@ use Carp; use Symbol; sub new { - @_ >= 1 && @_ <= 2 or croak 'usage: new SelectSaver [FILEHANDLE]'; + @_ >= 1 && @_ <= 2 or croak 'usage: SelectSaver->new( [FILEHANDLE] )'; my $fh = select; my $self = bless \$fh, $_[0]; select qualify($_[1], caller) if @_ > 1; |