Net::DNS::Lite - a pure-perl DNS resolver with support for timeout
use Net::DNS::Lite qw(inet_aton); # drop-in replacement for Socket::inet_aton $Net::DNS::Lite::TIMEOUT = 5; # global timeout variable my $addr = inet_aton("www.google.com"); # or per-query timeout my $addr = inet_aton("www.google.com", $timeout_in_seconds);
This module provides a replacement function for Socket::inet_aton, with support for timeouts.
Kazuho Oku
The module is based on the excellent AnyEvent::DNS by mlehmann.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See <http://www.perl.com/perl/misc/Artistic.html>
To install Net::DNS::Lite, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Net::DNS::Lite
CPAN shell
perl -MCPAN -e shell install Net::DNS::Lite
For more information on module installation, please visit the detailed CPAN module installation guide.