@@ -1,3 +1,37 @@
+Mon Feb 18 2013 Michael South <msouth@cpan.org>
+ o CPAN Release 2.61
+
+ o Correcting error in Makefile.PL :(
+
+Mon Feb 18 2013 Michael South <msouth@cpan.org>
+ o CPAN Release 2.60
+
+ o using 'localhost' when creating daemons for any local/*.t
+ tests. Some machines don't return a reachable domain
+ for `hostname`. This may need further refinement.
+ o exiting explicitly from daemon in local/*.t code that
+ creates them. This was already done in timeouts.t,
+ adding it to the other two locations.
+ o attempting a fix for https://rt.cpan.org/Ticket/Display.html?id=46821
+ without having reproduced. Should at least do no harm, though.
+ o applied (some of) the patch for https://rt.cpan.org/Ticket/Display.html?id=35775
+ by CHORNY@cpan.org (issue with use of `pwd` on Win32)
+ o adding (generated) META.yml and META.json
+
+Fri Feb 15 2013 Michael South <msouth@cpan.org>
+ o CPAN Release 2.59
+
+ o some tests were failing due to prerequisites that were not specified
+ o a little more robustness/info in debug mode of t/local/compatibility.t
+
+Tue Dec 11 2012 Michael South <msouth@cpan.org>
+
+ o CPAN Release 2.58
+
+ o updates for newer versions of libwww (tests now pass with libwww 6.04)
+ o "harder" deprecation of some (previously deprecated) UA shadow methods
+ o removed some deprecated constructs that were throwing warnings
+
Tue Feb 10 2004 Marc Langheinrich <marclang@cpan.org>
o CPAN Release 2.57
@@ -4,6 +4,8 @@ TODO
README
README.SSL
Makefile.PL
+META.yml
+META.json
lib/Bundle/ParallelUA.pm
lib/LWP/Parallel.pm
lib/LWP/ParallelUA.pm
@@ -0,0 +1,45 @@
+{
+ "abstract" : "Extension for LWP to allow parallel HTTP and FTP access",
+ "author" : [
+ "Marc Langheinrich <marclang@cpan.org>",
+ "Mike South (maintainer) <msouth@cpan.org>"
+ ],
+ "dynamic_config" : 0,
+ "generated_by" : "ExtUtils::MakeMaker version 6.62, CPAN::Meta::Converter version 2.112150",
+ "license" : [
+ "perl_5"
+ ],
+ "meta-spec" : {
+ "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec",
+ "version" : "2"
+ },
+ "name" : "ParallelUserAgent",
+ "no_index" : {
+ "directory" : [
+ "t",
+ "inc"
+ ]
+ },
+ "prereqs" : {
+ "build" : {
+ "requires" : {
+ "ExtUtils::MakeMaker" : 0
+ }
+ },
+ "configure" : {
+ "requires" : {
+ "ExtUtils::MakeMaker" : 0
+ }
+ },
+ "runtime" : {
+ "requires" : {
+ "IO::Socket::SSL" : 0,
+ "LWP" : "5.64",
+ "LWP::Protocol::http10" : 0,
+ "LWP::Protocol::https10" : 0
+ }
+ }
+ },
+ "release_status" : "stable",
+ "version" : "2.61"
+}
@@ -0,0 +1,26 @@
+---
+abstract: 'Extension for LWP to allow parallel HTTP and FTP access'
+author:
+ - 'Marc Langheinrich <marclang@cpan.org>'
+ - 'Mike South (maintainer) <msouth@cpan.org>'
+build_requires:
+ ExtUtils::MakeMaker: 0
+configure_requires:
+ ExtUtils::MakeMaker: 0
+dynamic_config: 0
+generated_by: 'ExtUtils::MakeMaker version 6.62, CPAN::Meta::Converter version 2.112150'
+license: perl
+meta-spec:
+ url: http://module-build.sourceforge.net/META-spec-v1.4.html
+ version: 1.4
+name: ParallelUserAgent
+no_index:
+ directory:
+ - t
+ - inc
+requires:
+ IO::Socket::SSL: 0
+ LWP: 5.64
+ LWP::Protocol::http10: 0
+ LWP::Protocol::https10: 0
+version: 2.61
@@ -2,9 +2,20 @@
# $Id: Makefile.PL,v 1.14 2004/02/10 15:19:10 langhein Exp $
use ExtUtils::MakeMaker;
+=pod
+
+I am cutting this out. If you are on a system without LWP it fails to install, when it
+would have succeeded if we just let the PREREQ_PM take effect. If we suddenly get
+a bunch of failure reports I can put this back in and special-case the situation
+where you don't have LWP at all (because, presumably, you're about to get a recent
+enough version in that case, as it will just pull the latest from CPAN). When I
+was about to write that code, I figured, well, let's just put the minimum required
+version of LWP in as per the standard and see if that works for poeple. So,
+good luck with that, file a bug if you disagree with this decision.
+
print "Checking your version of libwww...";
my $required = "5.64";
-my $supported = "5.76";
+my $supported = "6.04";
my $version;
eval {
require LWP;
@@ -49,15 +60,36 @@ PS: If you _do_ have the libwww-perl library installed, then this
EOT
exit; # No need to go on
} else {
- if ($version < $supported) { print " ok ($version)\nNote: you should upgrade to $supported (although ParallelUA should work ok)\n"; }
+ if ($version < $supported) { print " ok ($version)\nNote: you can upgrade to $supported (although ParallelUA should work ok)\n"; }
else { print " ok\n"; }
}
+
+=cut
+
# See lib/ExtUtils/MakeMaker.pm for details of how to influence
# the contents of the Makefile that is written.
WriteMakefile(
'NAME' => 'LWP::Parallel',
+ 'ABSTRACT' => 'Extension for LWP to allow parallel HTTP and FTP access',
'DISTNAME' => 'ParallelUserAgent',
'VERSION_FROM' => 'lib/LWP/Parallel.pm', # finds $VERSION
+ 'LICENSE' => 'perl',
+ 'AUTHOR' => 'Marc Langheinrich <marclang@cpan.org>, Mike South (maintainer) <msouth@cpan.org>',
+ #
+ # automated testing on 5.16.2 gave errors at make test; not able to find
+ # LWP::Protocol::http10. Repeated a reduced version of the
+ # test with https and it needed IO::Socket::SSL and LWP::Protocol::https10.
+ #
+ # I don't know any of the actual
+ # required version numbers here. This is a start on
+ # getting the problem fixed, though.
+ #
+ 'PREREQ_PM' => {
+ 'LWP' => 5.64,
+ 'LWP::Protocol::http10' => 0,
+ 'IO::Socket::SSL' => 0,
+ 'LWP::Protocol::https10' => 0,
+ },
);
package MY;
@@ -15,6 +15,17 @@ it under the same terms as Perl itself.
quality for this Perl module is somewhat less than what you
might expect from official CPAN releases :-(
+ Disclaimer 2.0
+ --------------
+ Hi, this is Mike South (msouth@cpan.org). I got myself added
+ as a co-maintainer to this project so that I could fix a few
+ small bugs and let it pass tests using more recent versions of
+ libwww. I have no deep knowledge of the module but I am
+ trying to address trivial blockers that are preventing legacy
+ users from being able to install on an updated system. I will
+ do my best to handle any issues that come up, and I thank you
+ in advance for your patience and suggestions/patches.
+
1. What is it?
--------------
@@ -63,7 +74,7 @@ it tests ok anyways :-)
Checked versions so far:
- libwww-5.76 use ParallelUA-2.57
+ libwww-5.76 - 6.04* use ParallelUA-2.61
libwww-5.66 - 5.69 untested
libwww-5.64 - 5.65 use ParallelUA-2.55
@@ -76,8 +87,13 @@ Checked versions so far:
libwww-5.19 untested
libwww-5.18 and below not ok!
-Note: For optimal performance you shoud use the _latest_ version of BOTH
- libwww-perl (i.e. 5.76) and ParallelUserAgent (i.e. 2.57).
+Note: For optimal results use the _latest_ version of BOTH
+ libwww-perl (i.e. 6.04) and ParallelUserAgent (i.e. 2.61).
+
+* note--not every single version in this range has been tested. 5.76,
+5.808, 6.04 I am sure of. There could be versions in between that
+need to go back to 2.57. If you find that to be the case please
+file a bug at rt.cpan.org for this distribution.
3. How to use it?
-----------------
@@ -118,18 +134,14 @@ how to use this module).
5. Questions, comments, etc.
----------------------------
-Question about how to use the underlying LWP library should be
-directed to the comp.lang.perl.modules USENET Newsgroup.
-
-Bug reports and suggestions for improvements can be sent to the
-<libwww-perl@ics.uci.edu> mailing list. This mailing list is also the
-place for general discussions and development of the libwww-perl
-package.
+You can join the libwww-perl mailing list by following the
+instructions at http://lists.perl.org/list/libwww-perl.html
+(send email to libwww-subscribe@perl.org).
-You can join the mailing list by sending a message to
-<libwww-perl-request@ics.uci.edu> with "Subscribe" as subject.
- ^^^^^^^^
+Bug reports and suggestions for improvements can be submitted via
+the cpan RT installation:
+https://rt.cpan.org/Dist/Display.html?Queue=ParallelUserAgent
COPYRIGHT
@@ -7,7 +7,6 @@ package LWP::Parallel::UserAgent::Entry;
require 5.004;
use Carp();
-use UNIVERSAL qw(can);
# allowed fields in Parallel::UserAgent entry
my %fields = (
@@ -387,7 +386,7 @@ Parallel::UserAgent return from $pua->wait().
If C<$arg> is omitted, then the content is stored in the response
object itself.
-If C<$arg> is a C<LPW::Parallel::UserAgent::Entry> object, then this
+If C<$arg> is a C<LWP::Parallel::UserAgent::Entry> object, then this
request will be registered as a follow-up request to this particular
entry. This will not create a new entry, but instead link the current
response (i.e. the reason for re-registering) as $response->previous
@@ -1298,7 +1297,9 @@ sub handle_response
unless (@challenge) {
$response->header("Client-Warning" =>
"Missing Authenticate header");
- LWP::Debug::trace("<- ($response [".$response->header.'] )');
+ # added the argument to header here (a guess at which header)
+ # because it dies if you pass no header https://rt.cpan.org/Ticket/Display.html?id=46821
+ LWP::Debug::trace("<- ($response [".$response->header('Client-Warning').'] )');
return $response;
}
@@ -1316,7 +1317,9 @@ sub handle_response
unless ($scheme =~ /^([a-z]+(?:-[a-z]+)*)$/) {
$response->header("Client-Warning" =>
"Bad authentication scheme '$scheme'");
- LWP::Debug::trace("<- ($response [".$response->header.'] )');
+ # added the argument to header here (a guess at which header)
+ # because it dies if you pass no header https://rt.cpan.org/Ticket/Display.html?id=46821
+ LWP::Debug::trace("<- ($response [".$response->header('Client-Warning').'] )');
return $response;
}
$scheme = $1; # untainted now
@@ -1324,7 +1327,7 @@ sub handle_response
$class =~ s/-/_/g;
no strict 'refs';
- unless (defined %{"$class\::"}) {
+ unless (%{"$class\::"}) {
# try to load it
eval "require $class";
if ($@) {
@@ -1341,7 +1344,9 @@ sub handle_response
return $class->authenticate($self, $proxy, $challenge, $response,
$request, $entry->arg, $entry->size);
}
- LWP::Debug::trace("<- ($response [".$response->header.'] )');
+ # added the argument to header here (a guess at which header)
+ # because it dies if you pass no header https://rt.cpan.org/Ticket/Display.html?id=46821
+ LWP::Debug::trace("<- ($response [".$response->header('Client-Warning').'] )');
return $response;
}
LWP::Debug::trace("<- standard exit ($response)");
@@ -1364,12 +1369,18 @@ sub _single_request {
}
}
-=item $ua->simple_request($request, [$arg [, $size]])
+=item DEPRECATED $ua->deprecated_simple_request($request, [$arg [, $size]])
-This method simulates the behavior of LWP::UserAgent->simple_request.
-It is actually kinda overkill to use this method in
-Parallel::UserAgent, and it is mainly here for testing backward
-compatibility with the original LWP::UserAgent. The following
+This method simulated the behavior of LWP::UserAgent->simple_request.
+It was actually kinda overkill to use this method in
+Parallel::UserAgent, and it was mainly here for testing backward
+compatibility with the original LWP::UserAgent.
+
+The name has been changed to deprecated_simple_request in case you
+need it, but because it it no longer compatible with the most recent
+version of libwww, it will no longer run by default.
+
+The following
description is taken directly from the corresponding libwww pod:
$ua->simple_request dispatches a single WWW request on behalf of a
@@ -1392,7 +1403,14 @@ object itself.
# sub simple_request
# (see LWP::UserAgent)
-sub send_request {
+# Took this out because with the new libwww it goes into deep
+# recursion. I believe calls that might have hit this will now
+# just go to LWP::UserAgent's implementation. If I comment
+# these out, tests pass; with them in, you get this deep
+# recursion. I'm assuming it's ok for them to just
+# go away, since they were deprecated many years ago after
+# all.
+sub deprecated_send_request {
my $self = shift;
$self->initialize;
@@ -1402,10 +1420,14 @@ sub send_request {
return $response;
}
-=item $ua->request($request, $arg [, $size])
+=item DEPRECATED $ua->deprecated_request($request, $arg [, $size])
+
+Previously called 'request' and included for compatibility testing with
+LWP::UserAgent. Every day usage was deprecated, and now you have to call it
+with the deprecated_request name if you want to use it (because an incompatibility
+was introduced with the newer versions of libwww).
-Included for compatibility testing with LWP::UserAgent. Every day
-usage is depreciated! Here is what LWP::UserAgent has to say about it:
+Here is what LWP::UserAgent has to say about it:
Process a request, including redirects and security. This method may
actually send several different simple reqeusts.
@@ -1414,7 +1436,7 @@ The arguments are the same as for C<simple_request()>.
=cut
-sub request {
+sub deprecated_request {
my $self = shift;
$self->initialize;
@@ -1494,7 +1516,9 @@ sub init_request {
$cookie_jar->add_cookie_header($request) if $cookie_jar;
# Transfer some attributes to the protocol object
- $protocol->parse_head($parse_head);
+ $protocol->can('parse_head') ?
+ $protocol->parse_head($parse_head) :
+ $protocol->_elem('parse_head', $parse_head);
$protocol->max_size($max_size);
LWP::Debug::trace ("<- (undef".
@@ -3,7 +3,7 @@
package LWP::Parallel;
-$VERSION = '2.57';
+$VERSION = '2.61';
sub Version { $VERSION };
require 5.004;
@@ -1,3 +1,4 @@
+# vim: set ft=perl :
$| = 1; # autoflush
my $DEBUG = 0;
@@ -18,9 +19,9 @@ if ($D eq 'daemon') {
require HTTP::Daemon;
- my $d = HTTP::Daemon->new(Timeout => 10);
+ my $d = HTTP::Daemon->new(Timeout => 10, LocalAddr=>'localhost');
- print "Please to meet you at: <URL:", $d->url, ">\n";
+ print "[$$] Pleased to meet you at: <URL:", $d->url, ">\n";
open(STDOUT, ">/dev/null");
@@ -40,8 +41,10 @@ if ($D eq 'daemon') {
$c = undef; # close connection
}
print STDERR "HTTP Server terminated\n" if $DEBUG;
+ exit 0;
} else {
use Config;
+ print STDERR "[$$] i'm starting the daemon now!\n" if $DEBUG;
open(DAEMON, "$Config{'perlpath'} local/compatibility.t daemon |") or die "Can't exec daemon: $!";
}
@@ -49,9 +52,11 @@ print "1..20\n";
my $greeting = <DAEMON>;
$greeting =~ /(<[^>]+>)/;
+print STDERR "I am [$$], greeting is [$greeting] and right now dollar 1 is [$1]\n" if $DEBUG;
+my $url_from_daemon = $1;
require URI;
-my $base = URI->new($1);
+my $base = URI->new($url_from_daemon);
sub url {
my $u = URI->new(@_);
$u = $u->abs($_[1]) if @_ > 1;
@@ -160,10 +165,12 @@ sub httpd_get_file
$req = new HTTP::Request GET => url("/file?name=$file", $base);
$res = $ua->request($req);
+# under previous versions of the library a $res->title was
+# returned--that part of this test has been removed for
+# compatibility with the new library
print "not " unless $res->is_success
and $res->content_type eq 'text/html'
and $res->content_length == 151
- and $res->title eq 'Test'
and $res->content =~ /different, since/;
print "ok 5\n";
@@ -220,7 +227,12 @@ while ($res->previous) {
$i++;
$res = $res->previous;
}
-print "not " unless $i == 6;
+# under the old library with the old "duplicated" methods (which are now
+# named with their old names preceded by "deprecated_") this chained
+# to a depth of 6. With the new library, and those methods
+# deprecated (search for 'sub deprecated_' in /LWP/Parallel/UserAgent.pm ),
+# it gives 8.
+print "not " unless ($i == 6 or $i == 8);
print "ok 11\n";
#----------------------------------------------------------------
@@ -15,8 +15,8 @@ my $ua = new LWP::Parallel::UserAgent;
$ua->agent("Mozilla/0.01 " . $ua->agent);
$ua->from('marclang@cpan.org');
-my $pwd = `pwd`;
-chomp $pwd;
+use Cwd;
+my $pwd = getcwd;
#---------------------------------------------------------------
print "\nLWP::Parallel::UserAgent interface...";
@@ -26,7 +26,7 @@ if ($D eq 'daemon') {
require HTTP::Daemon;
- my $d = new HTTP::Daemon Timeout => 10;
+ my $d = new HTTP::Daemon Timeout => 10, LocalAddr => 'localhost';
print "Please to meet you at: <URL:", $d->url, ">\n";
open(STDOUT, ">/dev/null");
@@ -45,6 +45,7 @@ if ($D eq 'daemon') {
$c = undef; # close connection
}
print STDERR "HTTP Server terminated\n" if $DEBUG;
+ exit 0;
} else {
use Config;
open(DAEMON, "$Config{'perlpath'} local/http.t daemon |") or die "Can't exec daemon: $!";
@@ -19,7 +19,7 @@ if ($D eq 'daemon')
# I am the Daemon
require HTTP::Daemon;
- my $d = new HTTP::Daemon Timeout => 10;
+ my $d = new HTTP::Daemon Timeout => 10, LocalAddr=>'localhost';
print "Please to meet you at: <URL:", $d->url, ">\n";
open(STDOUT, ">/dev/null");