1Net::DNS::Resolver::RecUusresre(C3o)ntributed Perl DocumNeentt:a:tDiNoSn::Resolver::Recurse(3)
2
3
4

NAME

6       Net::DNS::Resolver::Recurse - Perform recursive dns lookups
7

SYNOPSIS

9         use Net::DNS::Resolver::Recurse;
10         my $res = Net::DNS::Resolver::Recurse->new;
11

DESCRIPTION

13       This module is a sub class of Net::DNS::Resolver. So the methods for
14       Net::DNS::Resolver still work for this module as well.  There are just
15       a couple methods added:
16
17   hints
18       Initialize the hint servers.  Recursive queries need a starting name
19       server to work off of. This method takes a list of IP addresses to use
20       as the starting servers.  These name servers should be authoritative
21       for the root (.) zone.
22
23         $res->hints(@ips);
24
25       If no hints are passed, the default nameserver is asked for the hints.
26       Normally these IPs can be obtained from the following location:
27
28         ftp://ftp.internic.net/domain/named.root
29
30   recursion_callback
31       This method is takes a code reference, which is then invoked each time
32       a packet is received during the recursive lookup.  For example to
33       emulate dig's "+trace" function:
34
35        $res->recursion_callback(sub {
36            my $packet = shift;
37
38            $_->print for $packet->additional;
39
40            printf(";; Received %d bytes from %s\n\n",
41                $packet->answersize,
42                $packet->answerfrom
43            );
44        });
45
46   query_dorecursion
47       This method is much like the normal query() method except it disables
48       the recurse flag in the packet and explicitly performs the recursion.
49
50         $packet = $res->query_dorecursion( "www.netscape.com.", "A");
51

IPv6 transport

53       If the appropriate IPv6 libraries are installed the recursive resolver
54       will randomly choose between IPv6 and IPv4 addresses of the nameservers
55       it encounters during recursion.
56
57       If you want to force IPv4 transport use the force_v4() method. Also see
58       the IPv6 transport notes in the Net::DNS::Resolver documentation.
59

AUTHOR

61       Rob Brown, bbb@cpan.org
62

SEE ALSO

64       Net::DNS::Resolver,
65
67       Copyright (c) 2002, Rob Brown.  All rights reserved.  Portions
68       Copyright (c) 2005, Olaf M Kolkman.
69
70       This module is free software; you can redistribute it and/or modify it
71       under the same terms as Perl itself.
72
73       $Id: Recurse.pm 740 2008-12-17 23:20:53Z olaf $
74
75
76
77perl v5.12.0                      2009-01-26    Net::DNS::Resolver::Recurse(3)
Impressum