AnyEvent
view release on metacpan or search on metacpan
lib/AnyEvent/DNS.pm view on Meta::CPAN
# TODO: this blocks the program, but should not, but I
# am too lazy to implement and test it. need to boot windows. ugh.
#no strict 'refs';
# there are many options to find the current nameservers etc. on windows
# all of them don't work consistently:
# - the registry thing needs separate code on win32 native vs. cygwin
# - the registry layout differs between windows versions
# - calling windows api functions doesn't work on cygwin
# - ipconfig uses locale-specific messages
# we use Net::DNS::Resolver first, and if it fails, will fall back to
# ipconfig parsing.
unless (eval {
# Net::DNS::Resolver uses a LOT of ram (~10mb), but what can we do :/
# (this seems mostly to be due to Win32::API).
require Net::DNS::Resolver;
my $r = Net::DNS::Resolver->new;
$r->nameservers
( run in 1.522 second using v1.01-cache-2.11-cpan-ceb78f64989 )