in reply to AnyEvent::HTTP usage
in thread Async DNS with LWP
I guess you need to enter an AnyEvent "main loop" and wait for all asynchronous things to finish. See the AnyEvent documentation:
use AnyEvent; use AnyEvent::HTTP; my $done = AnyEvent->condvar; # stores whether a condition was flagged http_get "http://www.google.com/", sub { print $_[1]; $done->send }; $done->recv; # enters "main loop" till $condvar gets ->send
Even better, you could send yourself the data through the condvar.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: AnyEvent::HTTP usage
by jc (Acolyte) on Oct 05, 2010 at 15:01 UTC | |
by Corion (Patriarch) on Oct 05, 2010 at 15:47 UTC |