diff options
Diffstat (limited to 'systems/texlive/tlnet/tlpkg/tlperl/lib/Net')
18 files changed, 67 insertions, 87 deletions
diff --git a/systems/texlive/tlnet/tlpkg/tlperl/lib/Net/Cmd.pm b/systems/texlive/tlnet/tlpkg/tlperl/lib/Net/Cmd.pm index 41df8a264a..f10df74354 100644 --- a/systems/texlive/tlnet/tlpkg/tlperl/lib/Net/Cmd.pm +++ b/systems/texlive/tlnet/tlpkg/tlperl/lib/Net/Cmd.pm @@ -1,7 +1,7 @@ # Net::Cmd.pm # # Copyright (C) 1995-2006 Graham Barr. All rights reserved. -# Copyright (C) 2013-2016, 2020 Steve Hay. All rights reserved. +# Copyright (C) 2013-2016, 2020, 2022 Steve Hay. All rights reserved. # This module is free software; you can redistribute it and/or modify it under # the same terms as Perl itself, i.e. under the terms of either the GNU General # Public License or the Artistic License, as specified in the F<LICENCE> file. @@ -19,14 +19,14 @@ use Symbol 'gensym'; use Errno 'EINTR'; BEGIN { - if ($^O eq 'os390') { + if (ord "A" == 193) { require Convert::EBCDIC; # Convert::EBCDIC->import; } } -our $VERSION = "3.13"; +our $VERSION = "3.15"; our @ISA = qw(Exporter); our @EXPORT = qw(CMD_INFO CMD_OK CMD_MORE CMD_REJECT CMD_ERROR CMD_PENDING); @@ -41,7 +41,7 @@ use constant DEF_REPLY_CODE => 421; my %debug = (); -my $tr = $^O eq 'os390' ? Convert::EBCDIC->new() : undef; +my $tr = ord "A" == 193 ? Convert::EBCDIC->new() : undef; sub toebcdic { my $cmd = shift; @@ -887,7 +887,7 @@ libnet as of version 1.22_02. Copyright (C) 1995-2006 Graham Barr. All rights reserved. -Copyright (C) 2013-2016, 2020 Steve Hay. All rights reserved. +Copyright (C) 2013-2016, 2020, 2022 Steve Hay. All rights reserved. =head1 LICENCE @@ -897,11 +897,11 @@ License or the Artistic License, as specified in the F<LICENCE> file. =head1 VERSION -Version 3.13 +Version 3.15 =head1 DATE -23 Dec 2020 +20 March 2023 =head1 HISTORY diff --git a/systems/texlive/tlnet/tlpkg/tlperl/lib/Net/Config.pm b/systems/texlive/tlnet/tlpkg/tlperl/lib/Net/Config.pm index 2f8417f01a..bdbd0034d8 100644 --- a/systems/texlive/tlnet/tlpkg/tlperl/lib/Net/Config.pm +++ b/systems/texlive/tlnet/tlpkg/tlperl/lib/Net/Config.pm @@ -18,7 +18,7 @@ use Socket qw(inet_aton inet_ntoa); our @EXPORT = qw(%NetConfig); our @ISA = qw(Net::LocalCfg Exporter); -our $VERSION = "3.13"; +our $VERSION = "3.15"; our($CONFIGURE, $LIBNET_CFG); @@ -368,11 +368,11 @@ License or the Artistic License, as specified in the F<LICENCE> file. =head1 VERSION -Version 3.13 +Version 3.15 =head1 DATE -23 Dec 2020 +20 March 2023 =head1 HISTORY diff --git a/systems/texlive/tlnet/tlpkg/tlperl/lib/Net/Domain.pm b/systems/texlive/tlnet/tlpkg/tlperl/lib/Net/Domain.pm index d69ac5ba80..bf1ad2547b 100644 --- a/systems/texlive/tlnet/tlpkg/tlperl/lib/Net/Domain.pm +++ b/systems/texlive/tlnet/tlpkg/tlperl/lib/Net/Domain.pm @@ -19,7 +19,7 @@ use Net::Config; our @ISA = qw(Exporter); our @EXPORT_OK = qw(hostname hostdomain hostfqdn domainname); -our $VERSION = "3.13"; +our $VERSION = "3.15"; my ($host, $domain, $fqdn) = (undef, undef, undef); @@ -395,11 +395,11 @@ License or the Artistic License, as specified in the F<LICENCE> file. =head1 VERSION -Version 3.13 +Version 3.15 =head1 DATE -23 Dec 2020 +20 March 2023 =head1 HISTORY diff --git a/systems/texlive/tlnet/tlpkg/tlperl/lib/Net/FTP.pm b/systems/texlive/tlnet/tlpkg/tlperl/lib/Net/FTP.pm index 37836bf657..cee0b2846b 100644 --- a/systems/texlive/tlnet/tlpkg/tlperl/lib/Net/FTP.pm +++ b/systems/texlive/tlnet/tlpkg/tlperl/lib/Net/FTP.pm @@ -1,7 +1,7 @@ # Net::FTP.pm # # Copyright (C) 1995-2004 Graham Barr. All rights reserved. -# Copyright (C) 2013-2017, 2020 Steve Hay. All rights reserved. +# Copyright (C) 2013-2017, 2020, 2022 Steve Hay. All rights reserved. # This module is free software; you can redistribute it and/or modify it under # the same terms as Perl itself, i.e. under the terms of either the GNU General # Public License or the Artistic License, as specified in the F<LICENCE> file. @@ -23,7 +23,7 @@ use Net::Config; use Socket; use Time::Local; -our $VERSION = '3.13'; +our $VERSION = '3.15'; our $IOCLASS; my $family_key; @@ -66,7 +66,7 @@ use constant TELNET_IAC => 255; use constant TELNET_IP => 244; use constant TELNET_DM => 242; -use constant EBCDIC => $^O eq 'os390'; +use constant EBCDIC => ord 'A' == 193; sub new { my $pkg = shift; @@ -1052,14 +1052,7 @@ sub _dataconn { Timeout => $ftp->timeout, can_ssl() ? ( SSL_startHandshake => 0, - $ftp->is_SSL ? ( - SSL_reuse_ctx => $ftp, - SSL_verifycn_name => ${*$ftp}{net_ftp_tlsargs}{SSL_verifycn_name}, - # This will cause the use of SNI if supported by IO::Socket::SSL. - $ftp->can_client_sni ? ( - SSL_hostname => ${*$ftp}{net_ftp_tlsargs}{SSL_hostname} - ):(), - ) :( %{${*$ftp}{net_ftp_tlsargs}} ), + %{${*$ftp}{net_ftp_tlsargs}}, ):(), ) or return; } elsif (my $listen = delete ${*$ftp}{net_ftp_listen}) { @@ -1966,19 +1959,6 @@ Reinitialize the connection, flushing all I/O and account information. =back -=head1 EXAMPLES - -For an example of the use of Net::FTP see - -=over 4 - -=item L<https://www.csh.rit.edu/~adam/Progs/> - -C<autoftp> is a program that can retrieve, send, or list files via -the FTP protocol in a non-interactive manner. - -=back - =head1 EXPORTS I<None>. @@ -2034,7 +2014,7 @@ libnet as of version 1.22_02. Copyright (C) 1995-2004 Graham Barr. All rights reserved. -Copyright (C) 2013-2017, 2020 Steve Hay. All rights reserved. +Copyright (C) 2013-2017, 2020, 2022 Steve Hay. All rights reserved. =head1 LICENCE @@ -2044,11 +2024,11 @@ License or the Artistic License, as specified in the F<LICENCE> file. =head1 VERSION -Version 3.13 +Version 3.15 =head1 DATE -23 Dec 2020 +20 March 2023 =head1 HISTORY diff --git a/systems/texlive/tlnet/tlpkg/tlperl/lib/Net/FTP/A.pm b/systems/texlive/tlnet/tlpkg/tlperl/lib/Net/FTP/A.pm index 53446386c1..9b93e16cbc 100644 --- a/systems/texlive/tlnet/tlpkg/tlperl/lib/Net/FTP/A.pm +++ b/systems/texlive/tlnet/tlpkg/tlperl/lib/Net/FTP/A.pm @@ -13,7 +13,7 @@ use Carp; use Net::FTP::dataconn; our @ISA = qw(Net::FTP::dataconn); -our $VERSION = "3.13"; +our $VERSION = "3.15"; our $buf; diff --git a/systems/texlive/tlnet/tlpkg/tlperl/lib/Net/FTP/E.pm b/systems/texlive/tlnet/tlpkg/tlperl/lib/Net/FTP/E.pm index 9b1370778a..a10b9729f0 100644 --- a/systems/texlive/tlnet/tlpkg/tlperl/lib/Net/FTP/E.pm +++ b/systems/texlive/tlnet/tlpkg/tlperl/lib/Net/FTP/E.pm @@ -8,6 +8,6 @@ use warnings; use Net::FTP::I; our @ISA = qw(Net::FTP::I); -our $VERSION = "3.13"; +our $VERSION = "3.15"; 1; diff --git a/systems/texlive/tlnet/tlpkg/tlperl/lib/Net/FTP/I.pm b/systems/texlive/tlnet/tlpkg/tlperl/lib/Net/FTP/I.pm index 726cba197c..1c2b8a6088 100644 --- a/systems/texlive/tlnet/tlpkg/tlperl/lib/Net/FTP/I.pm +++ b/systems/texlive/tlnet/tlpkg/tlperl/lib/Net/FTP/I.pm @@ -13,7 +13,7 @@ use Carp; use Net::FTP::dataconn; our @ISA = qw(Net::FTP::dataconn); -our $VERSION = "3.13"; +our $VERSION = "3.15"; our $buf; diff --git a/systems/texlive/tlnet/tlpkg/tlperl/lib/Net/FTP/L.pm b/systems/texlive/tlnet/tlpkg/tlperl/lib/Net/FTP/L.pm index ac5e27ebad..d04fd920aa 100644 --- a/systems/texlive/tlnet/tlpkg/tlperl/lib/Net/FTP/L.pm +++ b/systems/texlive/tlnet/tlpkg/tlperl/lib/Net/FTP/L.pm @@ -8,6 +8,6 @@ use warnings; use Net::FTP::I; our @ISA = qw(Net::FTP::I); -our $VERSION = "3.13"; +our $VERSION = "3.15"; 1; diff --git a/systems/texlive/tlnet/tlpkg/tlperl/lib/Net/FTP/dataconn.pm b/systems/texlive/tlnet/tlpkg/tlperl/lib/Net/FTP/dataconn.pm index 5a257e677f..3db008df95 100644 --- a/systems/texlive/tlnet/tlpkg/tlperl/lib/Net/FTP/dataconn.pm +++ b/systems/texlive/tlnet/tlpkg/tlperl/lib/Net/FTP/dataconn.pm @@ -13,7 +13,7 @@ use Carp; use Errno; use Net::Cmd; -our $VERSION = '3.13'; +our $VERSION = '3.15'; $Net::FTP::IOCLASS or die "please load Net::FTP before Net::FTP::dataconn"; our @ISA = $Net::FTP::IOCLASS; @@ -224,11 +224,11 @@ License or the Artistic License, as specified in the F<LICENCE> file. =head1 VERSION -Version 3.13 +Version 3.15 =head1 DATE -23 Dec 2020 +20 March 2023 =head1 HISTORY diff --git a/systems/texlive/tlnet/tlpkg/tlperl/lib/Net/NNTP.pm b/systems/texlive/tlnet/tlpkg/tlperl/lib/Net/NNTP.pm index 3187f51961..59ed0ef5b3 100644 --- a/systems/texlive/tlnet/tlpkg/tlperl/lib/Net/NNTP.pm +++ b/systems/texlive/tlnet/tlpkg/tlperl/lib/Net/NNTP.pm @@ -19,7 +19,7 @@ use Net::Cmd; use Net::Config; use Time::Local; -our $VERSION = "3.13"; +our $VERSION = "3.15"; # Code for detecting if we can use SSL my $ssl_class = eval { @@ -1308,11 +1308,11 @@ License or the Artistic License, as specified in the F<LICENCE> file. =head1 VERSION -Version 3.13 +Version 3.15 =head1 DATE -23 Dec 2020 +20 March 2023 =head1 HISTORY diff --git a/systems/texlive/tlnet/tlpkg/tlperl/lib/Net/Netrc.pm b/systems/texlive/tlnet/tlpkg/tlperl/lib/Net/Netrc.pm index 50688eefd6..fe9abb9ddd 100644 --- a/systems/texlive/tlnet/tlpkg/tlperl/lib/Net/Netrc.pm +++ b/systems/texlive/tlnet/tlpkg/tlperl/lib/Net/Netrc.pm @@ -16,7 +16,7 @@ use warnings; use Carp; use FileHandle; -our $VERSION = "3.13"; +our $VERSION = "3.15"; our $TESTING; @@ -353,11 +353,11 @@ License or the Artistic License, as specified in the F<LICENCE> file. =head1 VERSION -Version 3.13 +Version 3.15 =head1 DATE -23 Dec 2020 +20 March 2023 =head1 HISTORY diff --git a/systems/texlive/tlnet/tlpkg/tlperl/lib/Net/POP3.pm b/systems/texlive/tlnet/tlpkg/tlperl/lib/Net/POP3.pm index 55f7be1342..e6239c7c86 100644 --- a/systems/texlive/tlnet/tlpkg/tlperl/lib/Net/POP3.pm +++ b/systems/texlive/tlnet/tlpkg/tlperl/lib/Net/POP3.pm @@ -18,7 +18,7 @@ use IO::Socket; use Net::Cmd; use Net::Config; -our $VERSION = "3.13"; +our $VERSION = "3.15"; # Code for detecting if we can use SSL my $ssl_class = eval { @@ -869,11 +869,11 @@ License or the Artistic License, as specified in the F<LICENCE> file. =head1 VERSION -Version 3.13 +Version 3.15 =head1 DATE -23 Dec 2020 +20 March 2023 =head1 HISTORY diff --git a/systems/texlive/tlnet/tlpkg/tlperl/lib/Net/Ping.pm b/systems/texlive/tlnet/tlpkg/tlperl/lib/Net/Ping.pm index 19bb51ec1a..b4c8f2f80b 100644 --- a/systems/texlive/tlnet/tlpkg/tlperl/lib/Net/Ping.pm +++ b/systems/texlive/tlnet/tlpkg/tlperl/lib/Net/Ping.pm @@ -22,7 +22,7 @@ use Time::HiRes; @ISA = qw(Exporter); @EXPORT = qw(pingecho); @EXPORT_OK = qw(wakeonlan); -$VERSION = "2.74"; +$VERSION = "2.76"; # Globals @@ -1081,8 +1081,7 @@ sub tcp_connect sub DESTROY { my $self = shift; - if ($self->{'proto'} eq 'tcp' && - $self->{'tcp_chld'}) { + if ($self->{'proto'} && ($self->{'proto'} eq 'tcp') && $self->{'tcp_chld'}) { # Put that choking client out of its misery kill "KILL", $self->{'tcp_chld'}; # Clean off the zombie @@ -2004,13 +2003,13 @@ Net::Ping - check a remote host for reachability use Net::Ping; - $p = Net::Ping->new(); + my $p = Net::Ping->new(); print "$host is alive.\n" if $p->ping($host); $p->close(); - $p = Net::Ping->new("icmp"); + my $p = Net::Ping->new("icmp"); $p->bind($my_addr); # Specify source interface of pings - foreach $host (@host_array) + foreach my $host (@host_array) { print "$host is "; print "NOT " unless $p->ping($host, 2); @@ -2019,11 +2018,11 @@ Net::Ping - check a remote host for reachability } $p->close(); - $p = Net::Ping->new("icmpv6"); - $ip = "[fd00:dead:beef::4e]"; + my $p = Net::Ping->new("icmpv6"); + my $ip = "[fd00:dead:beef::4e]"; print "$ip is alive.\n" if $p->ping($ip); - $p = Net::Ping->new("tcp", 2); + my $p = Net::Ping->new("tcp", 2); # Try connecting to the www port instead of the echo port $p->port_number(scalar(getservbyname("http", "tcp"))); while ($stop_time > time()) @@ -2035,19 +2034,19 @@ Net::Ping - check a remote host for reachability undef($p); # Like tcp protocol, but with many hosts - $p = Net::Ping->new("syn"); + my $p = Net::Ping->new("syn"); $p->port_number(getservbyname("http", "tcp")); - foreach $host (@host_array) { + foreach my $host (@host_array) { $p->ping($host); } - while (($host,$rtt,$ip) = $p->ack) { + while (my ($host, $rtt, $ip) = $p->ack) { print "HOST: $host [$ip] ACKed in $rtt seconds.\n"; } # High precision syntax (requires Time::HiRes) - $p = Net::Ping->new(); + my $p = Net::Ping->new(); $p->hires(); - ($ret, $duration, $ip) = $p->ping($host, 5.5); + my ($ret, $duration, $ip) = $p->ping($host, 5.5); printf("$host [ip: $ip] is alive (packet return time: %.2f ms)\n", 1000 * $duration) if $ret; diff --git a/systems/texlive/tlnet/tlpkg/tlperl/lib/Net/SMTP.pm b/systems/texlive/tlnet/tlpkg/tlperl/lib/Net/SMTP.pm index 354ed8e38f..e592bb53e4 100644 --- a/systems/texlive/tlnet/tlpkg/tlperl/lib/Net/SMTP.pm +++ b/systems/texlive/tlnet/tlpkg/tlperl/lib/Net/SMTP.pm @@ -19,7 +19,7 @@ use Net::Cmd; use Net::Config; use Socket; -our $VERSION = "3.13"; +our $VERSION = "3.15"; # Code for detecting if we can use SSL my $ssl_class = eval { @@ -1052,11 +1052,11 @@ License or the Artistic License, as specified in the F<LICENCE> file. =head1 VERSION -Version 3.13 +Version 3.15 =head1 DATE -23 Dec 2020 +20 March 2023 =head1 HISTORY diff --git a/systems/texlive/tlnet/tlpkg/tlperl/lib/Net/Time.pm b/systems/texlive/tlnet/tlpkg/tlperl/lib/Net/Time.pm index 7f0a724cd3..237c1747a4 100644 --- a/systems/texlive/tlnet/tlpkg/tlperl/lib/Net/Time.pm +++ b/systems/texlive/tlnet/tlpkg/tlperl/lib/Net/Time.pm @@ -22,7 +22,7 @@ use Net::Config; our @ISA = qw(Exporter); our @EXPORT_OK = qw(inet_time inet_daytime); -our $VERSION = "3.13"; +our $VERSION = "3.15"; our $TIMEOUT = 120; @@ -190,11 +190,11 @@ License or the Artistic License, as specified in the F<LICENCE> file. =head1 VERSION -Version 3.13 +Version 3.15 =head1 DATE -23 Dec 2020 +20 March 2023 =head1 HISTORY diff --git a/systems/texlive/tlnet/tlpkg/tlperl/lib/Net/hostent.pm b/systems/texlive/tlnet/tlpkg/tlperl/lib/Net/hostent.pm index 8831919fb4..babcdc165a 100644 --- a/systems/texlive/tlnet/tlpkg/tlperl/lib/Net/hostent.pm +++ b/systems/texlive/tlnet/tlpkg/tlperl/lib/Net/hostent.pm @@ -2,7 +2,7 @@ package Net::hostent; use strict; use 5.006_001; -our $VERSION = '1.02'; +our $VERSION = '1.03'; our (@EXPORT, @EXPORT_OK, %EXPORT_TAGS); our ( $h_name, @h_aliases, @@ -58,13 +58,14 @@ sub gethostbyaddr ($;$) { } sub gethost($) { - if ($_[0] =~ /^\d+(?:\.\d+(?:\.\d+(?:\.\d+)?)?)?$/) { - require Socket; - &gethostbyaddr(Socket::inet_aton(shift)); + my $addr = shift; + if ($addr =~ /^\d+(?:\.\d+(?:\.\d+(?:\.\d+)?)?)?$/) { + require Socket; + &gethostbyaddr(Socket::inet_aton($addr)); } else { - &gethostbyname; - } -} + &gethostbyname($addr); + } +} 1; __END__ diff --git a/systems/texlive/tlnet/tlpkg/tlperl/lib/Net/protoent.pm b/systems/texlive/tlnet/tlpkg/tlperl/lib/Net/protoent.pm index cef20fbd0b..18dc777d0f 100644 --- a/systems/texlive/tlnet/tlpkg/tlperl/lib/Net/protoent.pm +++ b/systems/texlive/tlnet/tlpkg/tlperl/lib/Net/protoent.pm @@ -2,7 +2,7 @@ package Net::protoent; use strict; use 5.006_001; -our $VERSION = '1.01'; +our $VERSION = '1.02'; our(@EXPORT, @EXPORT_OK, %EXPORT_TAGS); our ( $p_name, @p_aliases, $p_proto ); BEGIN { @@ -51,7 +51,7 @@ Net::protoent - by-name interface to Perl's built-in getproto*() functions =head1 SYNOPSIS use Net::protoent; - $p = getprotobyname(shift || 'tcp') || die "no proto"; + my $p = getprotobyname(shift || 'tcp') || die "no proto"; printf "proto for %s is %d, aliases are %s\n", $p->name, $p->proto, "@{$p->aliases}"; diff --git a/systems/texlive/tlnet/tlpkg/tlperl/lib/Net/servent.pm b/systems/texlive/tlnet/tlpkg/tlperl/lib/Net/servent.pm index a3b2bad2c2..3aa8389f99 100644 --- a/systems/texlive/tlnet/tlpkg/tlperl/lib/Net/servent.pm +++ b/systems/texlive/tlnet/tlpkg/tlperl/lib/Net/servent.pm @@ -2,7 +2,7 @@ package Net::servent; use strict; use 5.006_001; -our $VERSION = '1.02'; +our $VERSION = '1.03'; our(@EXPORT, @EXPORT_OK, %EXPORT_TAGS); our ( $s_name, @s_aliases, $s_port, $s_proto ); BEGIN { @@ -53,7 +53,7 @@ Net::servent - by-name interface to Perl's built-in getserv*() functions =head1 SYNOPSIS use Net::servent; - $s = getservbyname(shift || 'ftp') || die "no service"; + my $s = getservbyname(shift || 'ftp') || die "no service"; printf "port for %s is %s, aliases are %s\n", $s->name, $s->port, "@{$s->aliases}"; |