DNS::Unbound::AsyncQuery
my $dns = DNS::Unbound->new(); my $query = $dns->resolve_async( 'example.com', 'A' ); # Ordinary ES6 Promise semantics: $query->then( .. )->then( .. ); $query->cancel();
This object represents the result of an asynchronous DNS::Unbound query. It subclasses Promise::ES6 but provides a cancellation mechanism.
The promise resolves with the same hash that DNS::Unbound::resolve() returns. It rejects with a DNS::Unbound::X::ResolveError instance that describes the failure.
DNS::Unbound::resolve()
In addition to the methods inherited from Promise::ES6, this class provides:
Cancels an in-progress DNS query. Returns nothing.
To install DNS::Unbound, copy and paste the appropriate command in to your terminal.
cpanm
cpanm DNS::Unbound
CPAN shell
perl -MCPAN -e shell install DNS::Unbound
For more information on module installation, please visit the detailed CPAN module installation guide.