1Net::DNS::Resolver::RecUusresre(C3o)ntributed Perl DocumNeentt:a:tDiNoSn::Resolver::Recurse(3)
2
3
4
6 Net::DNS::Resolver::Recurse - DNS recursive resolver
7
9 use Net::DNS::Resolver::Recurse;
10
11 $resolver = new Net::DNS::Resolver::Recurse();
12
13 $packet = $resolver->query ( 'www.example.com', 'A' );
14 $packet = $resolver->search( 'www.example.com', 'A' );
15 $packet = $resolver->send ( 'www.example.com', 'A' );
16
18 This module is a subclass of Net::DNS::Resolver.
19
21 This module inherits almost all the methods from Net::DNS::Resolver.
22 Additional module-specific methods are described below.
23
24 hints
25 This method specifies a list of the IP addresses of nameservers to be
26 used to discover the addresses of the root nameservers.
27
28 $resolver->hints(@ip);
29
30 If no hints are passed, the priming query is directed to nameservers
31 drawn from a built-in list of IP addresses.
32
33 query, search, send
34 The query(), search() and send() methods produce the same result as
35 their counterparts in Net::DNS::Resolver.
36
37 $packet = $resolver->send( 'www.example.com.', 'A' );
38
39 Server-side recursion is suppressed by clearing the recurse flag in
40 query packets and recursive name resolution is performed explicitly.
41
42 The query() and search() methods are inherited from Net::DNS::Resolver
43 and invoke send() indirectly.
44
45 callback
46 This method specifies a code reference to a subroutine, which is then
47 invoked at each stage of the recursive lookup.
48
49 For example to emulate dig's "+trace" function:
50
51 my $coderef = sub {
52 my $packet = shift;
53
54 printf ";; Received %d bytes from %s\n\n",
55 $packet->answersize, $packet->answerfrom;
56 };
57
58 $resolver->callback($coderef);
59
60 The callback subroutine is not called for queries for missing glue
61 records.
62
64 This package is an improved and compatible reimplementation of the
65 Net::DNS::Resolver::Recurse.pm created by Rob Brown in 2002, whose
66 contribution is gratefully acknowledged.
67
69 Copyright (c)2014 Dick Franks.
70
71 Portions Copyright (c)2002 Rob Brown.
72
73 All rights reserved.
74
76 Permission to use, copy, modify, and distribute this software and its
77 documentation for any purpose and without fee is hereby granted,
78 provided that the above copyright notice appear in all copies and that
79 both that copyright notice and this permission notice appear in
80 supporting documentation, and that the name of the author not be used
81 in advertising or publicity pertaining to distribution of the software
82 without specific prior written permission.
83
84 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
85 OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
86 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
87 IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
88 CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
89 TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
90 SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
91
93 Net::DNS::Resolver
94
95
96
97perl v5.28.0 2018-11-14 Net::DNS::Resolver::Recurse(3)