Accepted options specific to the module are timeout or deadline (in seconds) and retry (in times). All other options, such as nameservers, dnssec etc etc are passed as is to the Net::DNS::Resolver constructor. See its man page for details.

Constructor new accepts Net::DNS-specific options (see OPTIONS above) and query, and returns a lambda. The lambda accepts no parameters, and returns either an IP address or a response object (depending on the call syntax, see below), or an error string.

new ($CLASS, %OPTIONS, $HOSTNAME) :: () -> ($IP_ADDRESS|$ERROR)

In the simple case, accepts $HOSTNAME string, and returns also a string, either an IP address or an error. To distinguish between these use /^\d/ regexp, because it is guaranteed that no error message will begin with a digit, and no IP address will begin with anything other than a digit.

In the complex case, accepts either Net::DNS::Packet object, or $HOSTNAME and $TYPE strings, where the latter can be one of A, MX, etc DNS query type. See "bgsend" in Net::DNS::Resolver for the exact syntax.