schnibitz has asked for the wisdom of the Perl Monks concerning the following question:
When I put a nested array in that last while loop, assign the response/ID to that array, and grab data out of that nested array in the rest of the code (outside the loop (dbi code BTW)), it works. It's slow, but it works. When I put that same DBI code in that loop, the response data gets all jumbled up. Is there anything in how HTTP::Async works that would make what I'm trying to do impossible? Or am I just messing something up. I don't get why a simple nested array would work, but when I put my code in there --the same code that originally referenced data in that array -- with the appropriate modifications the responses get all jumbled up. Any ideas? -S Thinking my dbi code, which inserts rows using data stored in strings, is getting passed over more than once simulteneously. So therefore string values are getting poisoned by other string values. I just don't really know how to prove that, or fix it. Any ideas? -Suse HTTP::Async; my $async = HTTP::Async->new; # create some requests and add them to the queue. $async->add( HTTP::Request->new( GET => 'http://www.perl.org/' + ) ); $async->add( HTTP::Request->new( GET => 'http://www.ecclestoad.co. +uk/' ) ); while ( my $response = $async->wait_for_next_response ) { # Do some processing with $response }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: HTTP:Async weirdness
by GrandFather (Saint) on Jan 22, 2012 at 02:51 UTC | |
by schnibitz (Novice) on Jan 22, 2012 at 04:17 UTC | |
by mbethke (Hermit) on Jan 22, 2012 at 05:28 UTC | |
by schnibitz (Novice) on Jan 22, 2012 at 14:54 UTC | |
by schnibitz (Novice) on Jan 22, 2012 at 15:59 UTC | |
by schnibitz (Novice) on Jan 22, 2012 at 22:34 UTC |