---
name: "Net::DNS::Lite"
section: "3pm"
platform: "linux"
package: "libnet-dns-lite-perl"
version: "0.12-2"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/Net::DNS::Lite"
---

# Net::DNS::Lite(3pm)

a pure-perl DNS resolver with support for timeout

## NAME

Net::DNS::Lite - a pure-perl DNS resolver with support for timeout

## SYNOPSIS

```
    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);
```

## DESCRIPTION

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.

## AUTHOR

Kazuho Oku

The module is based on the excellent AnyEvent::DNS by mlehmann.

## LICENSE

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\>
