> > However, if the regex doesn't match in the whole document,
> > LWP::Parallel::RobotUA continues to call the callback function
> > with an empty data chunk forever. How can I stop this, once the
> > whole document is received?
> does
>       return 1 if $data;
> 
> work?

Yesterday I had the same principle idea and tried

  return length $data;

It worked fine for my two testcases. 
The callback function was called one time more than neccessary, 
but I could live with that. 

However, is it guaranteed that length($data) > 0 as long as the end 
of the document is not reached? 
I noticed that $data may be smaller than the chunk size specified 
at registration.

Ciao, Claus                  [EMAIL PROTECTED]

-- 
Sent through GMX FreeMail - http://www.gmx.net

Reply via email to