Parallel UserAgent (2.36) bug?

Chai-Hup Chen (hup@gus.net)
Sat, 19 Sep 1998 11:40:03 -0700 (PDT)


Hi,
	PUA timeout function may not working well.
	I fixed my perl IO module before, and my LWP timeout working
	well. I found the code below give me 3 minutes timeout.

	It do help if I change /usr/lib/perl5/site_perl/LWP/UserAgent.pm
	timeout value.

	Is it's a PUA bug or my program?

# perl -v
This is perl, version 5.004_04 built for i586-linux

# perl -e 'use LWP::Parallel; print "This is 
LWP::Parallel_$LWP::Parallel::VERSION\n";'
This is LWP::Parallel_2.36

---Code Begin---
#!/usr/bin/perl 

use LWP::Parallel::UserAgent;
$ua = LWP::Parallel::UserAgent->new();

$METHOD = "GET";

$ua->register(HTTP::Request->new($METHOD => "http://www.infoseek.com"), 
\&ParseInfoseek );
$ua->register(HTTP::Request->new($METHOD => "http://www.yahoo.com"), 
\&ParseYahoo );
$ua->register(HTTP::Request->new($METHOD => "http://208.146.196.55"), 
\&ParseDie ); # a die IP

$ua->wait(20);
print "\nDone\n";

sub ParseYahoo {
  my($data, $response, $protocol) = @_;
  print "Yahoo! length data: ", length($data), "\n";
  return ;
}

sub ParseInfoseek {
  my($data, $response, $protocol) = @_;
  print "Infoseek! length data: ", length($data), "\n";
  return ;
}

sub ParseDie {
  my($data, $response, $protocol) = @_;
  print "Die length data: ", length($Die), "\n";
  return ;
}

----Code End ---
--
----------------------------------------------------------------------
AddALL is a book searching and price comparison meta search engine.
The free service find books and compare prices among 19 online bookstores.
Please visit http://www.addall.com to save your Time and Money.
-- Chai-Hup Chen hup@addall.com --------------------------------------