Net::DNS::Lite3pm
A pure-perl dns resolver with support for timeout
Usage
use Net::DNS::Lite qw(inet_aton);# drop-in replacement for Socket::inet_aton$Net::DNS::Lite::TIMEOUT = 5; # global timeout variablemy $addr = inet_aton("www.google.com");# or per-query timeoutmy $addr = inet_aton("www.google.com", $timeout_in_seconds);
Overview
This module provides a replacement function for Socket::inet_aton, with support for timeouts.
Configuration variables
$Net::DNS::Lite::TIMEOUT
maximum time (in seconds) inet_aton will block (default: 10)
$Net::DNS::Lite::CACHE
if set, Net::DNS::Lite will cache the DNS responses internally using the supplied cache object. The cache object should support "get", "set", and "remove" functions (default: none)
$Net::DNS::Lite::CACHE_TTL
maximum ttl of the cached entries (in seconds). Only has effect when $Net::DNS::Lite::CACHE is set.
Releases
5 releases since Debian 9 (Stretch); the text changed 1 time.