The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

DNS::Unbound::IOAsync - DNS::Unbound for IO::Async

SYNOPSIS

    my $loop = IO::Async::Loop->new();

    my $unbound = DNS::Unbound::IOAsync->new($loop);

    $unbound->resolve_async("perl.org", "A")->then(
        sub {
            my $result = shift;

            # ...
        }
    )->finally( sub { $loop->stop() } );

    $loop->run();

DESCRIPTION

This class provides native IO::Async compatibility for DNS::Unbound.

Note that this class’s new() requires an IO::Async::Loop instance to be passed. (See the "SYNOPSIS".)