summaryrefslogtreecommitdiff
path: root/Master/tlpkg/tlperl/lib/IO
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2019-03-10 21:56:14 +0000
committerKarl Berry <karl@freefriends.org>2019-03-10 21:56:14 +0000
commite0a2a718e89f9700d627f1e6a8eea8f21d2fbeb8 (patch)
tree39972f65008b0d70f306a5f976494d29411bc41e /Master/tlpkg/tlperl/lib/IO
parentb206fdc77d81ed1600949062f08de5690a4bf66f (diff)
tl19 perl 5.28.1 for Windows, from Siep
git-svn-id: svn://tug.org/texlive/trunk@50322 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/tlpkg/tlperl/lib/IO')
-rw-r--r--Master/tlpkg/tlperl/lib/IO/Dir.pm11
-rw-r--r--Master/tlpkg/tlperl/lib/IO/File.pm9
-rw-r--r--Master/tlpkg/tlperl/lib/IO/Handle.pm26
-rw-r--r--Master/tlpkg/tlperl/lib/IO/Pipe.pm5
-rw-r--r--Master/tlpkg/tlperl/lib/IO/Poll.pm13
-rw-r--r--Master/tlpkg/tlperl/lib/IO/Seekable.pm10
-rw-r--r--Master/tlpkg/tlperl/lib/IO/Select.pm27
-rw-r--r--Master/tlpkg/tlperl/lib/IO/Socket.pm9
-rw-r--r--Master/tlpkg/tlperl/lib/IO/Socket/INET.pm5
-rw-r--r--Master/tlpkg/tlperl/lib/IO/Socket/IP.pm6
-rw-r--r--Master/tlpkg/tlperl/lib/IO/Socket/UNIX.pm6
11 files changed, 61 insertions, 66 deletions
diff --git a/Master/tlpkg/tlperl/lib/IO/Dir.pm b/Master/tlpkg/tlperl/lib/IO/Dir.pm
index 7326d7823d4..e583fd389a7 100644
--- a/Master/tlpkg/tlperl/lib/IO/Dir.pm
+++ b/Master/tlpkg/tlperl/lib/IO/Dir.pm
@@ -6,22 +6,21 @@
package IO::Dir;
-use 5.006;
+use 5.008_001;
use strict;
use Carp;
use Symbol;
use Exporter;
use IO::File;
-our(@ISA, $VERSION, @EXPORT_OK);
use Tie::Hash;
use File::stat;
use File::Spec;
-@ISA = qw(Tie::Hash Exporter);
-$VERSION = "1.10";
-$VERSION = eval $VERSION;
-@EXPORT_OK = qw(DIR_UNLINK);
+our @ISA = qw(Tie::Hash Exporter);
+our $VERSION = "1.39";
+
+our @EXPORT_OK = qw(DIR_UNLINK);
sub DIR_UNLINK () { 1 }
diff --git a/Master/tlpkg/tlperl/lib/IO/File.pm b/Master/tlpkg/tlperl/lib/IO/File.pm
index 8b29bac2210..55c5e20d299 100644
--- a/Master/tlpkg/tlperl/lib/IO/File.pm
+++ b/Master/tlpkg/tlperl/lib/IO/File.pm
@@ -124,9 +124,8 @@ Derived from FileHandle.pm by Graham Barr E<lt>F<gbarr@pobox.com>E<gt>.
=cut
-use 5.006_001;
+use 5.008_001;
use strict;
-our($VERSION, @EXPORT, @EXPORT_OK, @ISA);
use Carp;
use Symbol;
use SelectSaver;
@@ -134,11 +133,11 @@ use IO::Seekable;
require Exporter;
-@ISA = qw(IO::Handle IO::Seekable Exporter);
+our @ISA = qw(IO::Handle IO::Seekable Exporter);
-$VERSION = "1.16";
+our $VERSION = "1.39";
-@EXPORT = @IO::Seekable::EXPORT;
+our @EXPORT = @IO::Seekable::EXPORT;
eval {
# Make all Fcntl O_XXX constants available for importing
diff --git a/Master/tlpkg/tlperl/lib/IO/Handle.pm b/Master/tlpkg/tlperl/lib/IO/Handle.pm
index ce976b0f443..60750575c85 100644
--- a/Master/tlpkg/tlperl/lib/IO/Handle.pm
+++ b/Master/tlpkg/tlperl/lib/IO/Handle.pm
@@ -260,21 +260,19 @@ Derived from FileHandle.pm by Graham Barr E<lt>F<gbarr@pobox.com>E<gt>
=cut
-use 5.006_001;
+use 5.008_001;
use strict;
-our($VERSION, @EXPORT_OK, @ISA);
use Carp;
use Symbol;
use SelectSaver;
use IO (); # Load the XS module
require Exporter;
-@ISA = qw(Exporter);
+our @ISA = qw(Exporter);
-$VERSION = "1.36";
-$VERSION = eval $VERSION;
+our $VERSION = "1.39";
-@EXPORT_OK = qw(
+our @EXPORT_OK = qw(
autoflush
output_field_separator
output_record_separator
@@ -366,7 +364,7 @@ sub fdopen {
my ($io, $fd, $mode) = @_;
local(*GLOB);
- if (ref($fd) && "".$fd =~ /GLOB\(/o) {
+ if (ref($fd) && "$fd" =~ /GLOB\(/o) {
# It's a glob reference; Alias it as we cannot get name of anon GLOBs
my $n = qualify(*GLOB);
*GLOB = *{*$fd};
@@ -494,7 +492,7 @@ sub stat {
##
sub autoflush {
- my $old = new SelectSaver qualify($_[0], caller);
+ my $old = SelectSaver->new(qualify($_[0], caller));
my $prev = $|;
$| = @_ > 1 ? $_[1] : 1;
$prev;
@@ -534,7 +532,7 @@ sub input_line_number {
sub format_page_number {
my $old;
- $old = new SelectSaver qualify($_[0], caller) if ref($_[0]);
+ $old = SelectSaver->new(qualify($_[0], caller)) if ref($_[0]);
my $prev = $%;
$% = $_[1] if @_ > 1;
$prev;
@@ -542,7 +540,7 @@ sub format_page_number {
sub format_lines_per_page {
my $old;
- $old = new SelectSaver qualify($_[0], caller) if ref($_[0]);
+ $old = SelectSaver->new(qualify($_[0], caller)) if ref($_[0]);
my $prev = $=;
$= = $_[1] if @_ > 1;
$prev;
@@ -550,7 +548,7 @@ sub format_lines_per_page {
sub format_lines_left {
my $old;
- $old = new SelectSaver qualify($_[0], caller) if ref($_[0]);
+ $old = SelectSaver->new(qualify($_[0], caller)) if ref($_[0]);
my $prev = $-;
$- = $_[1] if @_ > 1;
$prev;
@@ -558,7 +556,7 @@ sub format_lines_left {
sub format_name {
my $old;
- $old = new SelectSaver qualify($_[0], caller) if ref($_[0]);
+ $old = SelectSaver->new(qualify($_[0], caller)) if ref($_[0]);
my $prev = $~;
$~ = qualify($_[1], caller) if @_ > 1;
$prev;
@@ -566,7 +564,7 @@ sub format_name {
sub format_top_name {
my $old;
- $old = new SelectSaver qualify($_[0], caller) if ref($_[0]);
+ $old = SelectSaver->new(qualify($_[0], caller)) if ref($_[0]);
my $prev = $^;
$^ = qualify($_[1], caller) if @_ > 1;
$prev;
@@ -640,7 +638,7 @@ sub constant {
sub printflush {
my $io = shift;
my $old;
- $old = new SelectSaver qualify($io, caller) if ref($io);
+ $old = SelectSaver->new(qualify($io, caller)) if ref($io);
local $| = 1;
if(ref($io)) {
print $io @_;
diff --git a/Master/tlpkg/tlperl/lib/IO/Pipe.pm b/Master/tlpkg/tlperl/lib/IO/Pipe.pm
index 684069f4b7e..f24220f11f4 100644
--- a/Master/tlpkg/tlperl/lib/IO/Pipe.pm
+++ b/Master/tlpkg/tlperl/lib/IO/Pipe.pm
@@ -6,15 +6,14 @@
package IO::Pipe;
-use 5.006_001;
+use 5.008_001;
use IO::Handle;
use strict;
-our($VERSION);
use Carp;
use Symbol;
-$VERSION = "1.15";
+our $VERSION = "1.39";
sub new {
my $type = shift;
diff --git a/Master/tlpkg/tlperl/lib/IO/Poll.pm b/Master/tlpkg/tlperl/lib/IO/Poll.pm
index a02dc3db948..3e949b75f71 100644
--- a/Master/tlpkg/tlperl/lib/IO/Poll.pm
+++ b/Master/tlpkg/tlperl/lib/IO/Poll.pm
@@ -10,25 +10,24 @@ package IO::Poll;
use strict;
use IO::Handle;
use Exporter ();
-our(@ISA, @EXPORT_OK, @EXPORT, $VERSION);
-@ISA = qw(Exporter);
-$VERSION = "0.10";
+our @ISA = qw(Exporter);
+our $VERSION = "1.39";
-@EXPORT = qw( POLLIN
+our @EXPORT = qw( POLLIN
POLLOUT
POLLERR
POLLHUP
POLLNVAL
);
-@EXPORT_OK = qw(
- POLLPRI
+our @EXPORT_OK = qw(
+ POLLPRI
POLLRDNORM
POLLWRNORM
POLLRDBAND
POLLWRBAND
- POLLNORM
+ POLLNORM
);
# [0] maps fd's to requested masks
diff --git a/Master/tlpkg/tlperl/lib/IO/Seekable.pm b/Master/tlpkg/tlperl/lib/IO/Seekable.pm
index db1effda287..27ed663445d 100644
--- a/Master/tlpkg/tlperl/lib/IO/Seekable.pm
+++ b/Master/tlpkg/tlperl/lib/IO/Seekable.pm
@@ -94,21 +94,19 @@ Derived from FileHandle.pm by Graham Barr E<lt>gbarr@pobox.comE<gt>
=cut
-use 5.006_001;
+use 5.008_001;
use Carp;
use strict;
-our($VERSION, @EXPORT, @ISA);
use IO::Handle ();
# XXX we can't get these from IO::Handle or we'll get prototype
# mismatch warnings on C<use POSIX; use IO::File;> :-(
use Fcntl qw(SEEK_SET SEEK_CUR SEEK_END);
require Exporter;
-@EXPORT = qw(SEEK_SET SEEK_CUR SEEK_END);
-@ISA = qw(Exporter);
+our @EXPORT = qw(SEEK_SET SEEK_CUR SEEK_END);
+our @ISA = qw(Exporter);
-$VERSION = "1.10";
-$VERSION = eval $VERSION;
+our $VERSION = "1.39";
sub seek {
@_ == 3 or croak 'usage: $io->seek(POS, WHENCE)';
diff --git a/Master/tlpkg/tlperl/lib/IO/Select.pm b/Master/tlpkg/tlperl/lib/IO/Select.pm
index 994f8966ab6..6176f8bbf8a 100644
--- a/Master/tlpkg/tlperl/lib/IO/Select.pm
+++ b/Master/tlpkg/tlperl/lib/IO/Select.pm
@@ -8,12 +8,11 @@ package IO::Select;
use strict;
use warnings::register;
-use vars qw($VERSION @ISA);
require Exporter;
-$VERSION = "1.22";
+our $VERSION = "1.39";
-@ISA = qw(Exporter); # This is only so we can do version checking
+our @ISA = qw(Exporter); # This is only so we can do version checking
sub VEC_BITS () {0}
sub FD_COUNT () {1}
@@ -315,10 +314,13 @@ Return an array of all registered handles.
=item can_read ( [ TIMEOUT ] )
-Return an array of handles that are ready for reading. C<TIMEOUT> is
-the maximum amount of time to wait before returning an empty list, in
-seconds, possibly fractional. If C<TIMEOUT> is not given and any
-handles are registered then the call will block.
+Return an array of handles that are ready for reading. C<TIMEOUT> is the
+maximum amount of time to wait before returning an empty list (with C<$!>
+unchanged), in seconds, possibly fractional. If C<TIMEOUT> is not given
+and any handles are registered then the call will block indefinitely.
+Upon error, an empty list is returned, with C<$!> set to indicate the
+error. To distinguish between timeout and error, set C<$!> to zero
+before calling this method, and check it after an empty list is returned.
=item can_write ( [ TIMEOUT ] )
@@ -346,9 +348,14 @@ like C<new>. C<READ>, C<WRITE> and C<EXCEPTION> are either C<undef> or
C<IO::Select> objects. C<TIMEOUT> is optional and has the same effect as
for the core select call.
-The result will be an array of 3 elements, each a reference to an array
-which will hold the handles that are ready for reading, writing and have
-exceptions respectively. Upon error an empty list is returned.
+If at least one handle is ready for the specified kind of operation,
+the result will be an array of 3 elements, each a reference to an array
+which will hold the handles that are ready for reading, writing and
+have exceptions respectively. Upon timeout, an empty list is returned,
+with C<$!> unchanged. Upon error, an empty list is returned, with C<$!>
+set to indicate the error. To distinguish between timeout and error,
+set C<$!> to zero before calling this method, and check it after an
+empty list is returned.
=back
diff --git a/Master/tlpkg/tlperl/lib/IO/Socket.pm b/Master/tlpkg/tlperl/lib/IO/Socket.pm
index c78aeecc1a0..bea16ec6e40 100644
--- a/Master/tlpkg/tlperl/lib/IO/Socket.pm
+++ b/Master/tlpkg/tlperl/lib/IO/Socket.pm
@@ -7,13 +7,12 @@
package IO::Socket;
-require 5.006;
+use 5.008_001;
use IO::Handle;
use Socket 1.3;
use Carp;
use strict;
-our(@ISA, $VERSION, @EXPORT_OK);
use Exporter;
use Errno;
@@ -22,11 +21,11 @@ use Errno;
require IO::Socket::INET;
require IO::Socket::UNIX if ($^O ne 'epoc' && $^O ne 'symbian');
-@ISA = qw(IO::Handle);
+our @ISA = qw(IO::Handle);
-$VERSION = "1.38";
+our $VERSION = "1.39";
-@EXPORT_OK = qw(sockatmark);
+our @EXPORT_OK = qw(sockatmark);
sub import {
my $pkg = shift;
diff --git a/Master/tlpkg/tlperl/lib/IO/Socket/INET.pm b/Master/tlpkg/tlperl/lib/IO/Socket/INET.pm
index 7a1694733b5..084cb1c631b 100644
--- a/Master/tlpkg/tlperl/lib/IO/Socket/INET.pm
+++ b/Master/tlpkg/tlperl/lib/IO/Socket/INET.pm
@@ -7,15 +7,14 @@
package IO::Socket::INET;
use strict;
-our(@ISA, $VERSION);
use IO::Socket;
use Socket;
use Carp;
use Exporter;
use Errno;
-@ISA = qw(IO::Socket);
-$VERSION = "1.35";
+our @ISA = qw(IO::Socket);
+our $VERSION = "1.39";
my $EINVAL = exists(&Errno::EINVAL) ? Errno::EINVAL() : 1;
diff --git a/Master/tlpkg/tlperl/lib/IO/Socket/IP.pm b/Master/tlpkg/tlperl/lib/IO/Socket/IP.pm
index 1bf6b0ea89b..5a5ee7d204a 100644
--- a/Master/tlpkg/tlperl/lib/IO/Socket/IP.pm
+++ b/Master/tlpkg/tlperl/lib/IO/Socket/IP.pm
@@ -7,7 +7,7 @@ package IO::Socket::IP;
# $VERSION needs to be set before use base 'IO::Socket'
# - https://rt.cpan.org/Ticket/Display.html?id=92107
BEGIN {
- $VERSION = '0.38';
+ $VERSION = '0.39';
}
use strict;
@@ -31,7 +31,7 @@ use Socket 1.97 qw(
my $AF_INET6 = eval { Socket::AF_INET6() }; # may not be defined
my $AI_ADDRCONFIG = eval { Socket::AI_ADDRCONFIG() } || 0;
use POSIX qw( dup2 );
-use Errno qw( EINVAL EINPROGRESS EISCONN ENOTCONN ETIMEDOUT EWOULDBLOCK );
+use Errno qw( EINVAL EINPROGRESS EISCONN ENOTCONN ETIMEDOUT EWOULDBLOCK EOPNOTSUPP );
use constant HAVE_MSWIN32 => ( $^O eq "MSWin32" );
@@ -154,7 +154,7 @@ sub import
if( setsockopt $testsock, IPPROTO_IPV6, IPV6_V6ONLY, 0 ) {
return $can_disable_v6only = 1;
}
- elsif( $! == EINVAL ) {
+ elsif( $! == EINVAL || $! == EOPNOTSUPP ) {
return $can_disable_v6only = 0;
}
else {
diff --git a/Master/tlpkg/tlperl/lib/IO/Socket/UNIX.pm b/Master/tlpkg/tlperl/lib/IO/Socket/UNIX.pm
index 30b8f74eb05..a46dd593d64 100644
--- a/Master/tlpkg/tlperl/lib/IO/Socket/UNIX.pm
+++ b/Master/tlpkg/tlperl/lib/IO/Socket/UNIX.pm
@@ -7,13 +7,11 @@
package IO::Socket::UNIX;
use strict;
-our(@ISA, $VERSION);
use IO::Socket;
use Carp;
-@ISA = qw(IO::Socket);
-$VERSION = "1.26";
-$VERSION = eval $VERSION;
+our @ISA = qw(IO::Socket);
+our $VERSION = "1.39";
IO::Socket::UNIX->register_domain( AF_UNIX );