On Mon, 14 Feb 2000, Roy Nasser wrote:
> Is there a special list for ParallelUI?
nope, you can just use the standard LWP mailing list

> <cut>
> foreach $current (keys %URL){
>     $req = HTTP::Request->new('GET', $URL{$current});
>     $pua->register ($req, \&handle_answer);
> }
> </cut>
> 
> However this runs handle_answer sub as soon as any data comes back, and i
> would like it to run as soon as all the data arrives... Is this possible?
You can use the "on_return" method as described in the LWP::Parallel docs.
You will need to subclass from Parallel::UserAgent for this and then supply
your custom ->on_return method. Take a look at "perldoc LWP::Parallel".

> Also, is it possible to pass in another variable to handle_answer?
Mmh, I guess you'd need to hack the source for that. What are you thinking
about? If you only want to figure out the request URL (as in your example
given) you should be able to do that without passing any additional
variables. Take a look at t/TestScript.pl.

cheers

Marc
-- 
Marc Langheinrich
[EMAIL PROTECTED]

Reply via email to