On Tuesday 12 September 2006 10:27, Rob Dixon wrote:
> I think so Robin, thanks. But I'm still not clear whether you really need
> to retrieve the data through a filehandle; surely any suitable means of IPC
> will do?
Well yes, any IPC thing would do. However, I figured that handles represent 
streams of data, and what I want is a stream of data, so I should use a 
handle. 

> What may help is that LWP allows for a callback to be specified in the
> get() call, so that the downloaded data can be passed in chunks to a
> user-written subroutine as it arrives. Use
>    $agent->get($url, ':content_cb' => \&callback);
Hmm, that looks promising. But it would require making a significant bit of my 
code a lot less generic.

> Now I start to get a little out of my depth here, as I'm essentially a
> Windows man, but I suspect that your program could write these chunks to a
> pipe which is then opened and read by the processing program through a
> filehandle.
It could, but I don't want it to. It's a little bit ugly :) It would also 
require threads, which I know I can do without if I can get the data as a 
handle.

> Another suggestion is to look at IO::All::LWP, which extends the IO::All
> module to handle LWP connections. However, I have no experience of this
> module and can help you no further with it.
I'll take a look there, too. Thanks.

-- 
Robin <[EMAIL PROTECTED]> JabberID: <[EMAIL PROTECTED]>

Hostes alienigeni me abduxerunt. Qui annus est?

PGP Key 0xA99CEB6D = 5957 6D23 8B16 EFAB FEF8  7175 14D3 6485 A99C EB6D

Attachment: pgpoAFL6MCSqk.pgp
Description: PGP signature

Reply via email to