unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
blob 371693dca1a0f1b4a117a453817b9da6c86df2f5 1123 bytes (raw)
name: patches/perl-net-dns-resolver-programmable-fix.patch 	 # note: path name is non-authoritative(*)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
 
perl-net-dns-resolver-programmable used the undocumented and internal
method Net::DNS::rcodesbyname [0], and that interface is no longer
exposed.

This patch, copied from [1], makes the program check for the existence
of the method before trying to use it.

[0]
<https://rt.cpan.org/Public/Bug/Display.html?id=95901>

[1]
<https://rt.cpan.org/Public/Bug/Display.html?id=95901#txn-1575108>

diff --git a/lib/Net/DNS/Resolver/Programmable.pm b/lib/Net/DNS/Resolver/Programmable.pm
index 1af72ce..e09a2f0 100644
--- a/lib/Net/DNS/Resolver/Programmable.pm
+++ b/lib/Net/DNS/Resolver/Programmable.pm
@@ -203,8 +203,10 @@ sub send {
     if (defined(my $resolver_code = $self->{resolver_code})) {
         ($result, $aa, @answer_rrs) = $resolver_code->($domain, $rr_type, $class);
     }
-    
-    if (not defined($result) or defined($Net::DNS::rcodesbyname{$result})) {
+
+    if (not defined($result)
+         or defined($Net::DNS::Parameters::rcodebyname{$result})
+         or defined($Net::DNS::rcodesbyname{$result})) {
         # Valid RCODE, return a packet:
         
         $aa     = TRUE      if not defined($aa);

debug log:

solving 371693dca1a0f1b4a117a453817b9da6c86df2f5 ...
found 371693dca1a0f1b4a117a453817b9da6c86df2f5 in https://git.savannah.gnu.org/cgit/guix.git

(*) Git path names are given by the tree(s) the blob belongs to.
    Blobs themselves have no identifier aside from the hash of its contents.^

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).