Unable to run sample code of AnyEvent::HTTP
schmorp at schmorp.de
Tue Jul 13 01:49:31 CEST 2010
On Mon, Jul 12, 2010 at 09:10:59PM +0800, Ryan Chan <ryanchan404 at gmail.com> wrote:
> > just read AnyEvent::Intro.
> Btw, I think this page need to be updated:
The page is fine, you just need to learn event-based programming - the
synopsis says "do something else here", and your original program just
exited, so there was no chance to do something else.
Making the synopsis blocking would be very misleading and would lead to
broken programs if people copied it.
Keep in mind that AnyEvent::HTTP is event-based - if you want a blocking
interface that _waits_ for requests, you could use LWP.
The choice of a Deliantra, the free code+content MORPG
-----==- _GNU_ http://www.deliantra.net
----==-- _ generation
---==---(_)__ __ ____ __ Marc Lehmann
--==---/ / _ \/ // /\ \/ / schmorp at schmorp.de
More information about the anyevent