EV::DNS - perl interface to libevent's evdns module
use EV::DNS; EV::DNS::resolve_reverse +(Socket::inet_aton "129.13.162.95"), 0, sub { my ($result, $type, $ttl, @ptrs) = @_; warn "resolves to @ptrs"; }; EV::DNS::resolve_ipv4 "www.goof.com", 0, sub { my ($result, $type, $ttl, @ptrs) = @_; warn "resolves to " . Socket::inet_ntoa $ptrs[0] if @ptrs; };
This module provides an interface to libevent's evdns module, see (http://monkey.org/~provos/libevent/).
TODO
Called automatically when the module is firts used. Uses resolv.conf and/or some obscure win32 ibterface to initialise the nameservers and other parameters.
Shuts the DNS client down.
Use unpack "N", Socket::inet_aton "address".
resolve ipv6 crashes your program in libevent versions up and including at leats 1.3e.
EV::DNS::set_option "ndots:", "4"
Marc Lehmann <schmorp@schmorp.de> http://home.schmorp.de/
To install EV, copy and paste the appropriate command in to your terminal.
cpanm
cpanm EV
CPAN shell
perl -MCPAN -e shell install EV
For more information on module installation, please visit the detailed CPAN module installation guide.