diff options
author | Siep Kroonenberg <siepo@cybercomm.nl> | 2021-03-03 11:04:20 +0000 |
---|---|---|
committer | Siep Kroonenberg <siepo@cybercomm.nl> | 2021-03-03 11:04:20 +0000 |
commit | 13c3572d26e0868b9665513e4646ade860ae7810 (patch) | |
tree | 72f68d7c1270cc0a1d504f8eeb45d4de6b36f2d1 /Master/tlpkg/tlperl/site/lib/Socket.pm | |
parent | 87d16a01498a53c4bb455d78ae7131370e47591e (diff) |
Updated tlperl
git-svn-id: svn://tug.org/texlive/trunk@58075 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/tlpkg/tlperl/site/lib/Socket.pm')
-rw-r--r-- | Master/tlpkg/tlperl/site/lib/Socket.pm | 28 |
1 files changed, 16 insertions, 12 deletions
diff --git a/Master/tlpkg/tlperl/site/lib/Socket.pm b/Master/tlpkg/tlperl/site/lib/Socket.pm index 2c6b5e45d04..fe47ef67ec0 100644 --- a/Master/tlpkg/tlperl/site/lib/Socket.pm +++ b/Master/tlpkg/tlperl/site/lib/Socket.pm @@ -1,9 +1,9 @@ package Socket; use strict; -{ use 5.006001; } +{ use v5.6.1; } -our $VERSION = '2.029'; +our $VERSION = '2.031'; =head1 NAME @@ -110,7 +110,7 @@ level. =head2 IP_PMTUDISC_WANT, IP_PMTUDISC_DONT, ... -Socket option value contants for C<IP_MTU_DISCOVER> socket option. +Socket option value constants for C<IP_MTU_DISCOVER> socket option. =head2 IPTOS_LOWDELAY, IPTOS_THROUGHPUT, IPTOS_RELIABILITY, ... @@ -837,6 +837,14 @@ BEGIN { *LF = \LF(); *CRLF = \CRLF(); +# The four deprecated addrinfo constants +foreach my $name (qw( AI_IDN_ALLOW_UNASSIGNED AI_IDN_USE_STD3_ASCII_RULES NI_IDN_ALLOW_UNASSIGNED NI_IDN_USE_STD3_ASCII_RULES )) { + no strict 'refs'; + *$name = sub { + croak "The addrinfo constant $name is deprecated"; + }; +} + sub sockaddr_in { if (@_ == 6 && !wantarray) { # perl5.001m compat; use this && die my($af, $port, @quad) = @_; @@ -916,13 +924,9 @@ if( defined &getaddrinfo ) { # Constants we don't support. Export them, but croak if anyone tries to # use them - AI_IDN => 64, - AI_CANONIDN => 128, - AI_IDN_ALLOW_UNASSIGNED => 256, - AI_IDN_USE_STD3_ASCII_RULES => 512, - NI_IDN => 32, - NI_IDN_ALLOW_UNASSIGNED => 64, - NI_IDN_USE_STD3_ASCII_RULES => 128, + AI_IDN => 64, + AI_CANONIDN => 128, + NI_IDN => 32, # Error constants we'll never return, so it doesn't matter what value # these have, nor that we don't provide strings for them @@ -992,7 +996,7 @@ sub fake_getaddrinfo # to talk AF_INET. If not we'd have to return no addresses at all. :) $flags &= ~(AI_V4MAPPED()|AI_ALL()|AI_ADDRCONFIG()); - $flags & (AI_IDN()|AI_CANONIDN()|AI_IDN_ALLOW_UNASSIGNED()|AI_IDN_USE_STD3_ASCII_RULES()) and + $flags & (AI_IDN()|AI_CANONIDN()) and croak "Socket::getaddrinfo() does not support IDN"; $flags == 0 or return fake_makeerr( EAI_BADFLAGS() ); @@ -1090,7 +1094,7 @@ sub fake_getnameinfo my $flag_namereqd = $flags & NI_NAMEREQD(); $flags &= ~NI_NAMEREQD(); my $flag_dgram = $flags & NI_DGRAM() ; $flags &= ~NI_DGRAM(); - $flags & (NI_IDN()|NI_IDN_ALLOW_UNASSIGNED()|NI_IDN_USE_STD3_ASCII_RULES()) and + $flags & NI_IDN() and croak "Socket::getnameinfo() does not support IDN"; $flags == 0 or return fake_makeerr( EAI_BADFLAGS() ); |