in reply to LWP Connection Wasting

In short, no, and it will not happen.

In longer, there is LWP::ParallelUserAgent or something like that.

To be even more verbose - the problem with connection reuse is, that Perl dosen't know when you're done and there is no way of closing a connection after the timeout has expired unless you do it explicitly. Now that Perl has threads, this could be implemented by spawning a "watcher" thread, but at least under Win32, threads vs. sockets is an interesting topic.

Also, the HTTP/1.1 request pipelining means a complete deviation from the LWP request/response model unless you have a good dispatching mechanism and write your programs explicitly to take advantage of it - POE could implement something like it, but POE is ugly, as are all event driven mechanisms.

Replies are listed 'Best First'.
Re: Re: LWP Connection Wasting
by bmann (Priest) on Mar 11, 2004 at 20:14 UTC
    Hmm. I think you can reuse an existing connection - unless I misunderstand the keep_alive parameter and LWP::ConnCache. These specifically use HTTP 1.1 and reuse existing connections if available, instead of building (and tearing down) a connection for each request.