Net::Curl::Simple::Async - perform Net::Curl requests asynchronously
use Net::Curl::Simple; use Net::Curl::Simple::Async qw(AnyEvent Select);
This module is loaded by Net::Curl::Simple. The only reason to use it directly would be to force some event implementation.
use Irssi; # Irssi backend would be picked use Net::Curl::Simple::Async qw(AnyEvent POE);
Returns internal curl multi handle. You can use it to add bare Net::Curl::Easy objects. Net::Curl::Simple objects add themselves to this handle automatically.
Function used to warn about lack of AsynchDNS. You can overwrite it if you hate the warning.
{ no warnings 'redefine'; # don't warn at all *Net::Curl::Simple::Async::warn_noasynchdns = sub ($) { }; }
Lack of AsynchDNS support in libcurl can severely reduce Net::Curl::Simple::Async efficiency. You should not disable the warning, just replace it with a method more suitable in your application.
Net::Curl::Simple::Async
Net::Curl::Simple::Async will check backends in this order:
Used with Coro only.
Based on EV - an awesome and very efficient event library. Use it whenever you can.
Will be used if Irssi has been loaded. Does not support join() method - it will issue a warning and won't block.
Will be used if AnyEvent has been loaded. In most cases you will already have a looping mechanism on your own, but you can call Net::Curl::Simple->join if you don't need anything better.
Net::Curl::Simple->join
Used under POE, only if no other backend could be detected. Slooow, avoid it. If you're using POE try POE::Loop::EV.
Direct loop implementation using perl's builtin select. Will be used if no other backend has been found. You must call join() to get anything done.
Net::Curl::Simple Net::Curl::Simple::UserAgent Net::Curl::Multi
Copyright (c) 2011 Przemyslaw Iskra <sparky at pld-linux.org>.
This program is free software; you can redistribute it and/or modify it under the same terms as perl itself.
To install Net::Curl::Simple, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Net::Curl::Simple
CPAN shell
perl -MCPAN -e shell install Net::Curl::Simple
For more information on module installation, please visit the detailed CPAN module installation guide.