NAME

Fetch::Loop::AnyEvent - run Fetch under AnyEvent

SYNOPSIS

use AnyEvent;
use Fetch;

my $ua = Fetch->new(loop => 'AnyEvent');
my $f  = $ua->get('https://example.com/');
my $cv = AE::cv;
$f->on_ready(sub { $cv->send });
$cv->recv;
print $f->get->content;

DESCRIPTION

Adapts AnyEvent so Fetch cooperates with whatever event loop AnyEvent is driving (EV, Perl, etc.). Pass loop => 'AnyEvent' to Fetch->new and this adapter is used.

new

Load AnyEvent and build the adapter.

install_await

Install $Fetch::Future::AWAIT so a bare $future->get waits on an AnyEvent condvar that the future signals when ready.

AUTHOR

LNATION <email@lnation.org>

LICENSE AND COPYRIGHT

This software is Copyright (c) 2026 by LNATION. This is free software, licensed under the Artistic License 2.0.