summaryrefslogtreecommitdiff
path: root/Master/tlpkg/tlperl/site/lib/LWP
diff options
context:
space:
mode:
Diffstat (limited to 'Master/tlpkg/tlperl/site/lib/LWP')
-rw-r--r--Master/tlpkg/tlperl/site/lib/LWP/Authen/Basic.pm4
-rw-r--r--Master/tlpkg/tlperl/site/lib/LWP/Authen/Digest.pm4
-rw-r--r--Master/tlpkg/tlperl/site/lib/LWP/Authen/Ntlm.pm2
-rw-r--r--Master/tlpkg/tlperl/site/lib/LWP/ConnCache.pm2
-rw-r--r--Master/tlpkg/tlperl/site/lib/LWP/Debug.pm4
-rw-r--r--Master/tlpkg/tlperl/site/lib/LWP/Debug/TraceHTTP.pm9
-rw-r--r--Master/tlpkg/tlperl/site/lib/LWP/DebugFile.pm4
-rw-r--r--Master/tlpkg/tlperl/site/lib/LWP/MemberMixin.pm4
-rw-r--r--Master/tlpkg/tlperl/site/lib/LWP/Protocol.pm4
-rw-r--r--Master/tlpkg/tlperl/site/lib/LWP/Protocol/cpan.pm4
-rw-r--r--Master/tlpkg/tlperl/site/lib/LWP/Protocol/data.pm4
-rw-r--r--Master/tlpkg/tlperl/site/lib/LWP/Protocol/file.pm12
-rw-r--r--Master/tlpkg/tlperl/site/lib/LWP/Protocol/ftp.pm11
-rw-r--r--Master/tlpkg/tlperl/site/lib/LWP/Protocol/gopher.pm6
-rw-r--r--Master/tlpkg/tlperl/site/lib/LWP/Protocol/http.pm20
-rw-r--r--Master/tlpkg/tlperl/site/lib/LWP/Protocol/loopback.pm5
-rw-r--r--Master/tlpkg/tlperl/site/lib/LWP/Protocol/mailto.pm4
-rw-r--r--Master/tlpkg/tlperl/site/lib/LWP/Protocol/nntp.pm4
-rw-r--r--Master/tlpkg/tlperl/site/lib/LWP/Protocol/nogo.pm4
-rw-r--r--Master/tlpkg/tlperl/site/lib/LWP/RobotUA.pm2
-rw-r--r--Master/tlpkg/tlperl/site/lib/LWP/Simple.pm2
-rw-r--r--Master/tlpkg/tlperl/site/lib/LWP/UserAgent.pm27
22 files changed, 91 insertions, 51 deletions
diff --git a/Master/tlpkg/tlperl/site/lib/LWP/Authen/Basic.pm b/Master/tlpkg/tlperl/site/lib/LWP/Authen/Basic.pm
index 18fe8cd5f1c..a5cc949e6a3 100644
--- a/Master/tlpkg/tlperl/site/lib/LWP/Authen/Basic.pm
+++ b/Master/tlpkg/tlperl/site/lib/LWP/Authen/Basic.pm
@@ -1,7 +1,9 @@
package LWP::Authen::Basic;
-$LWP::Authen::Basic::VERSION = '6.25';
+
use strict;
+our $VERSION = '6.31';
+
require MIME::Base64;
sub auth_header {
diff --git a/Master/tlpkg/tlperl/site/lib/LWP/Authen/Digest.pm b/Master/tlpkg/tlperl/site/lib/LWP/Authen/Digest.pm
index 2e80af49729..7a7c3e01e04 100644
--- a/Master/tlpkg/tlperl/site/lib/LWP/Authen/Digest.pm
+++ b/Master/tlpkg/tlperl/site/lib/LWP/Authen/Digest.pm
@@ -1,8 +1,10 @@
package LWP::Authen::Digest;
-$LWP::Authen::Digest::VERSION = '6.25';
+
use strict;
use base 'LWP::Authen::Basic';
+our $VERSION = '6.31';
+
require Digest::MD5;
sub auth_header {
diff --git a/Master/tlpkg/tlperl/site/lib/LWP/Authen/Ntlm.pm b/Master/tlpkg/tlperl/site/lib/LWP/Authen/Ntlm.pm
index 7fd0a827f3d..3c3a7c30bb2 100644
--- a/Master/tlpkg/tlperl/site/lib/LWP/Authen/Ntlm.pm
+++ b/Master/tlpkg/tlperl/site/lib/LWP/Authen/Ntlm.pm
@@ -2,7 +2,7 @@ package LWP::Authen::Ntlm;
use strict;
-our $VERSION = '6.25';
+our $VERSION = '6.31';
use Authen::NTLM "1.02";
use MIME::Base64 "2.12";
diff --git a/Master/tlpkg/tlperl/site/lib/LWP/ConnCache.pm b/Master/tlpkg/tlperl/site/lib/LWP/ConnCache.pm
index 172e2f49a5b..47fae6b4384 100644
--- a/Master/tlpkg/tlperl/site/lib/LWP/ConnCache.pm
+++ b/Master/tlpkg/tlperl/site/lib/LWP/ConnCache.pm
@@ -2,7 +2,7 @@ package LWP::ConnCache;
use strict;
-our $VERSION = '6.25';
+our $VERSION = '6.31';
our $DEBUG;
sub new {
diff --git a/Master/tlpkg/tlperl/site/lib/LWP/Debug.pm b/Master/tlpkg/tlperl/site/lib/LWP/Debug.pm
index f7334c425df..d8305e4b78d 100644
--- a/Master/tlpkg/tlperl/site/lib/LWP/Debug.pm
+++ b/Master/tlpkg/tlperl/site/lib/LWP/Debug.pm
@@ -1,5 +1,7 @@
package LWP::Debug; # legacy
-$LWP::Debug::VERSION = '6.25';
+
+our $VERSION = '6.31';
+
require Exporter;
our @ISA = qw(Exporter);
our @EXPORT_OK = qw(level trace debug conns);
diff --git a/Master/tlpkg/tlperl/site/lib/LWP/Debug/TraceHTTP.pm b/Master/tlpkg/tlperl/site/lib/LWP/Debug/TraceHTTP.pm
index 4dc70a096f7..b063bfe5e3a 100644
--- a/Master/tlpkg/tlperl/site/lib/LWP/Debug/TraceHTTP.pm
+++ b/Master/tlpkg/tlperl/site/lib/LWP/Debug/TraceHTTP.pm
@@ -1,5 +1,5 @@
package LWP::Debug::TraceHTTP;
-$LWP::Debug::TraceHTTP::VERSION = '6.25';
+
# Just call:
#
# require LWP::Debug::TraceHTTP;
@@ -11,8 +11,11 @@ $LWP::Debug::TraceHTTP::VERSION = '6.25';
use strict;
use base 'LWP::Protocol::http';
-package LWP::Debug::TraceHTTP::Socket;
-$LWP::Debug::TraceHTTP::Socket::VERSION = '6.25';
+our $VERSION = '6.31';
+
+package # hide from PAUSE
+ LWP::Debug::TraceHTTP::Socket;
+
use Data::Dump 1.13;
use Data::Dump::Trace qw(autowrap mcall);
diff --git a/Master/tlpkg/tlperl/site/lib/LWP/DebugFile.pm b/Master/tlpkg/tlperl/site/lib/LWP/DebugFile.pm
index 681415f4ccd..2f99249d3be 100644
--- a/Master/tlpkg/tlperl/site/lib/LWP/DebugFile.pm
+++ b/Master/tlpkg/tlperl/site/lib/LWP/DebugFile.pm
@@ -1,5 +1,7 @@
package LWP::DebugFile;
-$LWP::DebugFile::VERSION = '6.25';
+
+our $VERSION = '6.31';
+
# legacy stub
1;
diff --git a/Master/tlpkg/tlperl/site/lib/LWP/MemberMixin.pm b/Master/tlpkg/tlperl/site/lib/LWP/MemberMixin.pm
index d56a2e8abad..3b7962af026 100644
--- a/Master/tlpkg/tlperl/site/lib/LWP/MemberMixin.pm
+++ b/Master/tlpkg/tlperl/site/lib/LWP/MemberMixin.pm
@@ -1,5 +1,7 @@
package LWP::MemberMixin;
-$LWP::MemberMixin::VERSION = '6.25';
+
+our $VERSION = '6.31';
+
sub _elem {
my $self = shift;
my $elem = shift;
diff --git a/Master/tlpkg/tlperl/site/lib/LWP/Protocol.pm b/Master/tlpkg/tlperl/site/lib/LWP/Protocol.pm
index 3adbaf3de49..02a57e90fca 100644
--- a/Master/tlpkg/tlperl/site/lib/LWP/Protocol.pm
+++ b/Master/tlpkg/tlperl/site/lib/LWP/Protocol.pm
@@ -2,7 +2,7 @@ package LWP::Protocol;
use base 'LWP::MemberMixin';
-our $VERSION = '6.25';
+our $VERSION = '6.31';
use strict;
use Carp ();
@@ -53,7 +53,7 @@ sub implementor
return '' unless $scheme =~ /^([.+\-\w]+)$/; # check valid URL schemes
$scheme = $1; # untaint
- $scheme =~ s/[.+\-]/_/g; # make it a legal module name
+ $scheme =~ tr/.+-/_/; # make it a legal module name
# scheme not yet known, look for a 'use'd implementation
$ic = "LWP::Protocol::$scheme"; # default location
diff --git a/Master/tlpkg/tlperl/site/lib/LWP/Protocol/cpan.pm b/Master/tlpkg/tlperl/site/lib/LWP/Protocol/cpan.pm
index 3288abdbc12..cf27eb672ff 100644
--- a/Master/tlpkg/tlperl/site/lib/LWP/Protocol/cpan.pm
+++ b/Master/tlpkg/tlperl/site/lib/LWP/Protocol/cpan.pm
@@ -1,9 +1,11 @@
package LWP::Protocol::cpan;
-$LWP::Protocol::cpan::VERSION = '6.25';
+
use strict;
use base qw(LWP::Protocol);
+our $VERSION = '6.31';
+
require URI;
require HTTP::Status;
require HTTP::Response;
diff --git a/Master/tlpkg/tlperl/site/lib/LWP/Protocol/data.pm b/Master/tlpkg/tlperl/site/lib/LWP/Protocol/data.pm
index 3b256528a4f..a75ba570b4c 100644
--- a/Master/tlpkg/tlperl/site/lib/LWP/Protocol/data.pm
+++ b/Master/tlpkg/tlperl/site/lib/LWP/Protocol/data.pm
@@ -1,9 +1,11 @@
package LWP::Protocol::data;
-$LWP::Protocol::data::VERSION = '6.25';
+
# Implements access to data:-URLs as specified in RFC 2397
use strict;
+our $VERSION = '6.31';
+
require HTTP::Response;
require HTTP::Status;
diff --git a/Master/tlpkg/tlperl/site/lib/LWP/Protocol/file.pm b/Master/tlpkg/tlperl/site/lib/LWP/Protocol/file.pm
index e83149dbd90..2db309af894 100644
--- a/Master/tlpkg/tlperl/site/lib/LWP/Protocol/file.pm
+++ b/Master/tlpkg/tlperl/site/lib/LWP/Protocol/file.pm
@@ -1,9 +1,11 @@
package LWP::Protocol::file;
-$LWP::Protocol::file::VERSION = '6.25';
+
use base qw(LWP::Protocol);
use strict;
+our $VERSION = '6.31';
+
require LWP::MediaTypes;
require HTTP::Request;
require HTTP::Response;
@@ -126,17 +128,17 @@ sub request
# read the file
if ($method ne "HEAD") {
- open(F, $path) or return new
+ open(my $fh, '<', $path) or return new
HTTP::Response(HTTP::Status::RC_INTERNAL_SERVER_ERROR,
"Cannot read file '$path': $!");
- binmode(F);
+ binmode($fh);
$response = $self->collect($arg, $response, sub {
my $content = "";
- my $bytes = sysread(F, $content, $size);
+ my $bytes = sysread($fh, $content, $size);
return \$content if $bytes > 0;
return \ "";
});
- close(F);
+ close($fh);
}
$response;
diff --git a/Master/tlpkg/tlperl/site/lib/LWP/Protocol/ftp.pm b/Master/tlpkg/tlperl/site/lib/LWP/Protocol/ftp.pm
index 2a96c1b7c55..37c836be73c 100644
--- a/Master/tlpkg/tlperl/site/lib/LWP/Protocol/ftp.pm
+++ b/Master/tlpkg/tlperl/site/lib/LWP/Protocol/ftp.pm
@@ -1,10 +1,12 @@
package LWP::Protocol::ftp;
-$LWP::Protocol::ftp::VERSION = '6.25';
+
# Implementation of the ftp protocol (RFC 959). We let the Net::FTP
# package do all the dirty work.
use base qw(LWP::Protocol);
use strict;
+our $VERSION = '6.31';
+
use Carp ();
use HTTP::Status ();
use HTTP::Negotiate ();
@@ -15,9 +17,10 @@ use File::Listing ();
{
- package LWP::Protocol::MyFTP;
-$LWP::Protocol::MyFTP::VERSION = '6.25';
-use strict;
+ package # hide from PAUSE
+ LWP::Protocol::MyFTP;
+
+ use strict;
use base qw(Net::FTP);
sub new {
diff --git a/Master/tlpkg/tlperl/site/lib/LWP/Protocol/gopher.pm b/Master/tlpkg/tlperl/site/lib/LWP/Protocol/gopher.pm
index e6fe5ce8473..ae559a9b74d 100644
--- a/Master/tlpkg/tlperl/site/lib/LWP/Protocol/gopher.pm
+++ b/Master/tlpkg/tlperl/site/lib/LWP/Protocol/gopher.pm
@@ -1,5 +1,5 @@
package LWP::Protocol::gopher;
-$LWP::Protocol::gopher::VERSION = '6.25';
+
# Implementation of the gopher protocol (RFC 1436)
#
# This code is based on 'wwwgopher.pl,v 0.10 1994/10/17 18:12:34 shelden'
@@ -9,6 +9,8 @@ $LWP::Protocol::gopher::VERSION = '6.25';
use strict;
+our $VERSION = '6.31';
+
require HTTP::Response;
require HTTP::Status;
require IO::Socket;
@@ -185,7 +187,7 @@ sub gopher2url
sub menu2html {
my($menu) = @_;
- $menu =~ s/\015//g; # remove carriage return
+ $menu =~ tr/\015//d; # remove carriage return
my $tmp = <<"EOT";
<HTML>
<HEAD>
diff --git a/Master/tlpkg/tlperl/site/lib/LWP/Protocol/http.pm b/Master/tlpkg/tlperl/site/lib/LWP/Protocol/http.pm
index 2266b1e9ea6..b5448ac6aa4 100644
--- a/Master/tlpkg/tlperl/site/lib/LWP/Protocol/http.pm
+++ b/Master/tlpkg/tlperl/site/lib/LWP/Protocol/http.pm
@@ -1,7 +1,9 @@
package LWP::Protocol::http;
-$LWP::Protocol::http::VERSION = '6.25';
+
use strict;
+our $VERSION = '6.31';
+
require HTTP::Response;
require HTTP::Status;
require Net::HTTP;
@@ -42,6 +44,8 @@ sub _new_socket
$@ =~ /\b(Crypt-SSLeay can't verify hostnames)\b/
) {
$status .= " ($1)";
+ } elsif ($@) {
+ $status .= " ($@)";
}
die "$status\n\n$@";
}
@@ -232,7 +236,7 @@ sub request
$request_headers->scan(sub {
my($k, $v) = @_;
$k =~ s/^://;
- $v =~ s/\n/ /g;
+ $v =~ tr/\n/ /;
push(@h, $k, $v);
});
@@ -497,8 +501,9 @@ sub request
#-----------------------------------------------------------
-package LWP::Protocol::http::SocketMethods;
-$LWP::Protocol::http::SocketMethods::VERSION = '6.25';
+package # hide from PAUSE
+ LWP::Protocol::http::SocketMethods;
+
sub ping {
my $self = shift;
!$self->can_read(0);
@@ -510,8 +515,9 @@ sub increment_response_count {
}
#-----------------------------------------------------------
-package LWP::Protocol::http::Socket;
-$LWP::Protocol::http::Socket::VERSION = '6.25';
-use base qw(LWP::Protocol::http::SocketMethods Net::HTTP);
+package # hide from PAUSE
+ LWP::Protocol::http::Socket;
+
+use parent -norequire, qw(LWP::Protocol::http::SocketMethods Net::HTTP);
1;
diff --git a/Master/tlpkg/tlperl/site/lib/LWP/Protocol/loopback.pm b/Master/tlpkg/tlperl/site/lib/LWP/Protocol/loopback.pm
index f1e4c9f918e..61037fd7dd8 100644
--- a/Master/tlpkg/tlperl/site/lib/LWP/Protocol/loopback.pm
+++ b/Master/tlpkg/tlperl/site/lib/LWP/Protocol/loopback.pm
@@ -1,6 +1,9 @@
package LWP::Protocol::loopback;
-$LWP::Protocol::loopback::VERSION = '6.25';
+
use strict;
+
+our $VERSION = '6.31';
+
require HTTP::Response;
use base qw(LWP::Protocol);
diff --git a/Master/tlpkg/tlperl/site/lib/LWP/Protocol/mailto.pm b/Master/tlpkg/tlperl/site/lib/LWP/Protocol/mailto.pm
index 9358695d57d..a069ae0589c 100644
--- a/Master/tlpkg/tlperl/site/lib/LWP/Protocol/mailto.pm
+++ b/Master/tlpkg/tlperl/site/lib/LWP/Protocol/mailto.pm
@@ -1,5 +1,5 @@
package LWP::Protocol::mailto;
-$LWP::Protocol::mailto::VERSION = '6.25';
+
# This module implements the mailto protocol. It is just a simple
# frontend to the Unix sendmail program except on MacOS, where it uses
# Mail::Internet.
@@ -11,6 +11,8 @@ require HTTP::Status;
use Carp;
use strict;
+our $VERSION = '6.31';
+
use base qw(LWP::Protocol);
our $SENDMAIL;
diff --git a/Master/tlpkg/tlperl/site/lib/LWP/Protocol/nntp.pm b/Master/tlpkg/tlperl/site/lib/LWP/Protocol/nntp.pm
index 9727a247a51..6c7051bf0d7 100644
--- a/Master/tlpkg/tlperl/site/lib/LWP/Protocol/nntp.pm
+++ b/Master/tlpkg/tlperl/site/lib/LWP/Protocol/nntp.pm
@@ -1,9 +1,11 @@
package LWP::Protocol::nntp;
-$LWP::Protocol::nntp::VERSION = '6.25';
+
# Implementation of the Network News Transfer Protocol (RFC 977)
use base qw(LWP::Protocol);
+our $VERSION = '6.31';
+
require HTTP::Response;
require HTTP::Status;
require Net::NNTP;
diff --git a/Master/tlpkg/tlperl/site/lib/LWP/Protocol/nogo.pm b/Master/tlpkg/tlperl/site/lib/LWP/Protocol/nogo.pm
index a9b0e411ee7..b481dc14263 100644
--- a/Master/tlpkg/tlperl/site/lib/LWP/Protocol/nogo.pm
+++ b/Master/tlpkg/tlperl/site/lib/LWP/Protocol/nogo.pm
@@ -4,9 +4,11 @@ package LWP::Protocol::nogo;
# LWP::Protocol::implementor(that_scheme, 'LWP::Protocol::nogo');
# For then on, attempts to access URLs with that scheme will generate
# a 500 error.
-$LWP::Protocol::nogo::VERSION = '6.25';
+
use strict;
+our $VERSION = '6.31';
+
require HTTP::Response;
require HTTP::Status;
use base qw(LWP::Protocol);
diff --git a/Master/tlpkg/tlperl/site/lib/LWP/RobotUA.pm b/Master/tlpkg/tlperl/site/lib/LWP/RobotUA.pm
index 0e96856329a..912a72d4a65 100644
--- a/Master/tlpkg/tlperl/site/lib/LWP/RobotUA.pm
+++ b/Master/tlpkg/tlperl/site/lib/LWP/RobotUA.pm
@@ -2,7 +2,7 @@ package LWP::RobotUA;
use base qw(LWP::UserAgent);
-our $VERSION = '6.25';
+our $VERSION = '6.31';
require WWW::RobotRules;
require HTTP::Request;
diff --git a/Master/tlpkg/tlperl/site/lib/LWP/Simple.pm b/Master/tlpkg/tlperl/site/lib/LWP/Simple.pm
index 321f9641c48..db6727dd87c 100644
--- a/Master/tlpkg/tlperl/site/lib/LWP/Simple.pm
+++ b/Master/tlpkg/tlperl/site/lib/LWP/Simple.pm
@@ -2,7 +2,7 @@ package LWP::Simple;
use strict;
-our $VERSION = '6.25';
+our $VERSION = '6.31';
require Exporter;
diff --git a/Master/tlpkg/tlperl/site/lib/LWP/UserAgent.pm b/Master/tlpkg/tlperl/site/lib/LWP/UserAgent.pm
index 07c391605e3..5bbff8ecc9c 100644
--- a/Master/tlpkg/tlperl/site/lib/LWP/UserAgent.pm
+++ b/Master/tlpkg/tlperl/site/lib/LWP/UserAgent.pm
@@ -15,7 +15,7 @@ use LWP::Protocol ();
use Scalar::Util qw(blessed);
use Try::Tiny qw(try catch);
-our $VERSION = '6.25';
+our $VERSION = '6.31';
sub new
{
@@ -387,7 +387,7 @@ sub request {
}
$scheme = $1; # untainted now
my $class = "LWP::Authen::\u$scheme";
- $class =~ s/-/_/g;
+ $class =~ tr/-/_/;
no strict 'refs';
unless (%{"$class\::"}) {
@@ -660,13 +660,11 @@ sub redirect_ok
return 1;
}
-
-sub credentials
-{
- my $self = shift;
- my $netloc = lc(shift);
- my $realm = shift || "";
- my $old = $self->{basic_authentication}{$netloc}{$realm};
+sub credentials {
+ my $self = shift;
+ my $netloc = lc(shift || '');
+ my $realm = shift || "";
+ my $old = $self->{basic_authentication}{$netloc}{$realm};
if (@_) {
$self->{basic_authentication}{$netloc}{$realm} = [@_];
}
@@ -675,7 +673,6 @@ sub credentials
return join(":", @$old);
}
-
sub get_basic_credentials
{
my($self, $realm, $uri, $proxy) = @_;
@@ -900,16 +897,20 @@ sub handlers {
sub run_handlers {
my($self, $phase, $o) = @_;
+
+ # here we pass $_[2] to the callbacks, instead of $o, so that they
+ # can assign to it; e.g. request_prepare is documented to allow
+ # that
if (defined(wantarray)) {
for my $h ($self->handlers($phase, $o)) {
- my $ret = $h->{callback}->($o, $self, $h);
+ my $ret = $h->{callback}->($_[2], $self, $h);
return $ret if $ret;
}
return undef;
}
for my $h ($self->handlers($phase, $o)) {
- $h->{callback}->($o, $self, $h);
+ $h->{callback}->($_[2], $self, $h);
}
}
@@ -1459,7 +1460,7 @@ that have a valid certificate matching the expected hostname. If FALSE no
checks are made and you can't be sure that you communicate with the expected peer.
The no checks behaviour was the default for libwww-perl-5.837 and earlier releases.
-This option is initialized from the L<PERL_LWP_SSL_VERIFY_HOSTNAME> environment
+This option is initialized from the C<PERL_LWP_SSL_VERIFY_HOSTNAME> environment
variable. If this environment variable isn't set; then C<verify_hostname>
defaults to 1.