++ed by:
SYP EGOR PINGAN

3 PAUSE users

Author image Felipe Gasper
and 1 contributors

NAME

Net::Curl::Promiser::AnyEvent - support for AnyEvent

SYNOPSIS

    my $promiser = Net::Curl::Promiser::AnyEvent->new();

    my $handle = Net::Curl::Easy->new();
    $handle->setopt( CURLOPT_URL() => $url );

    my $cv = AnyEvent->condvar();

    $promiser->add_handle($handle)->then(
        sub { print "$url completed.$/" },
        sub { warn "$url failed: " . shift },
    )->finally($cv);

    $cv->recv();

DESCRIPTION

This module provides an AnyEvent-compatible interface for Net::Curl::Promiser.

See /examples in the distribution for a fleshed-out demonstration.

NOTE: The actual interface is that provided by Net::Curl::Promiser::LoopBase.