README
1NAME
2 Net::DNS::Lite - a pure-perl DNS resolver with support for timeout
3
4SYNOPSIS
5 use Net::DNS::Lite qw(inet_aton);
6
7 # drop-in replacement for Socket::inet_aton
8 $Net::DNS::Lite::TIMEOUT = 5; # global timeout variable
9 my $addr = inet_aton("www.google.com");
10
11 # or per-query timeout
12 my $addr = inet_aton("www.google.com", $timeout_in_seconds);
13
14DESCRIPTION
15 This module provides a replacement function for Socket::inet_aton, with
16 support for timeouts.
17
18CONFIGURATION VARIABLES
19 $Net::DNS::Lite::TIMEOUT
20 maximum time (in seconds) inet_aton will block (default: 10)
21
22 $Net::DNS::Lite::CACHE
23 if set, Net::DNS::Lite will cache the DNS responses internally using the
24 supplied cache object. The cache object should support "get", "set", and
25 "remove" functions (default: none)
26
27 $Net::DNS::Lite::CACHE_TTL
28 maximum ttl of the cached entries (in seconds). Only has effect when
29 $Net::DNS::Lite::CACHE is set.
30
31AUTHOR
32 Kazuho Oku
33
34 The module is based on the excellent AnyEvent::DNS by mlehmann.
35
36LICENSE
37 This program is free software; you can redistribute it and/or modify it
38 under the same terms as Perl itself.
39
40 See <http://www.perl.com/perl/misc/Artistic.html>
41
42