Net::DNS::Resolver

Net::DNS::Resolver is a DNS resolver class.
Download

Net::DNS::Resolver Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Olaf M. Kolkman
  • Publisher web site:
  • http://search.cpan.org/~olaf/Net-DNS-0.63/lib/Net/DNS/Resolver.pm

Net::DNS::Resolver Tags


Net::DNS::Resolver Description

Net::DNS::Resolver is a DNS resolver class. Net::DNS::Resolver is a DNS resolver class.SYNOPSIS use Net::DNS; my $res = Net::DNS::Resolver->new; # Perform a lookup, using the searchlist if appropriate. my $answer = $res->search('example.com'); # Perform a lookup, without the searchlist my $answer = $res->query('example.com', 'MX'); # Perform a lookup, without pre or post-processing my $answer = $res->send('example.com', 'MX', 'CH'); # Send a prebuilt packet my $packet = Net::DNS::Packet->new(...); my $answer = $res->send($packet);Instances of the Net::DNS::Resolver class represent resolver objects. A program can have multiple resolver objects, each maintaining its own state information such as the nameservers to be queried, whether recursion is desired, etc.METHODSnew # Use the system defaults my $res = Net::DNS::Resolver->new; # Use my own configuration file my $res = Net::DNS::Resolver->new(config_file => '/my/dns.conf'); # Set options in the constructor my $res = Net::DNS::Resolver->new( nameservers => , recurse => 0, debug => 1, );Returns a resolver object. If given no arguments, new() returns an object configured to your system's defaults. On UNIX systems the defaults are read from the following files, in the order indicated: /etc/resolv.conf $HOME/.resolv.conf ./.resolv.confThe following keywords are recognized in resolver configuration files:domain The default domain.search A space-separated list of domains to put in the search list.nameserver A space-separated list of nameservers to query.Files except for /etc/resolv.conf must be owned by the effective userid running the program or they won't be read. In addition, several environment variables can also contain configuration information; see "ENVIRONMENT".On Windows systems, an attempt is made to determine the system defaults using the registry. This is still a work in progress; systems with many dynamically configured network interfaces may confuse Net::DNS. Requirements: · Perl


Net::DNS::Resolver Related Software