diff options
Diffstat (limited to 'Master/tlpkg/tlperl/lib/IO/Handle.pm')
-rw-r--r-- | Master/tlpkg/tlperl/lib/IO/Handle.pm | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/Master/tlpkg/tlperl/lib/IO/Handle.pm b/Master/tlpkg/tlperl/lib/IO/Handle.pm index 6ca3c8a35d6..68e6d902e44 100644 --- a/Master/tlpkg/tlperl/lib/IO/Handle.pm +++ b/Master/tlpkg/tlperl/lib/IO/Handle.pm @@ -268,7 +268,7 @@ use IO (); # Load the XS module require Exporter; @ISA = qw(Exporter); -$VERSION = "1.31"; +$VERSION = "1.33"; $VERSION = eval $VERSION; @EXPORT_OK = qw( @@ -430,14 +430,14 @@ sub say { print $this @_; } +# Special XS wrapper to make them inherit lexical hints from the caller. +_create_getline_subs( <<'END' ) or die $@; sub getline { @_ == 1 or croak 'usage: $io->getline()'; my $this = shift; return scalar <$this>; } -*gets = \&getline; # deprecated - sub getlines { @_ == 1 or croak 'usage: $io->getlines()'; wantarray or @@ -445,6 +445,10 @@ sub getlines { my $this = shift; return <$this>; } +1; # return true for error checking +END + +*gets = \&getline; # deprecated sub truncate { @_ == 2 or croak 'usage: $io->truncate(LEN)'; |