The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Net::Curl::Promiser::AnyEvent

SYNOPSIS

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

    my $cv = AnyEvent->condvar();

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

    $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.

INVALID METHODS

The following methods from Net::Curl::Promiser are unneeded in this class and thus produce an exception if called:

process()
time_out()
get_timeout()