How about you show us the actual code that is failing rather than have us guess at it? Even better would be to reproduce the problem you are getting by mocking up some code to look like HTTP::Async and HTTP::Request, maybe as simple as:
use strict; use warnings; package MockAsync; sub new { my ($class, %params) = @_; return bless \%params, $class; } sub add { my ($self, $request) = @_; push @{$self->{sources}}, $request; } sub wait_for_next_response { my ($self) = @_; return if ! @{$self->{sources}}; return splice @{$self->{sources}}, rand @{$self->{sources}}, 1; } package MockRequest; sub new { my ($class, %params) = @_; return bless \%params, $class; } sub uri { my ($self) = @_; return $self->{GET}; } package main; my $async = MockAsync->new; $async->add(MockRequest->new(GET => 'http://www.perl.org/')); $async->add(MockRequest->new(GET => 'http://www.ecclestoad.co.uk/')); while (my $response = $async->wait_for_next_response) { printf "Response from %s\n", $response->uri (); }
The point being that you can isolate the HTTP related code from the database code and thus isolate the problem code.
In reply to Re: HTTP:Async weirdness
by GrandFather
in thread HTTP:Async weirdness
by schnibitz
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |