From 8d60dd71745d8e76df408378e56f8cfdcf0122c5 Mon Sep 17 00:00:00 2001 From: Danny Milosavljevic Date: Thu, 28 Jul 2016 23:38:20 +0200 Subject: gnu: Add perl-net-dns-resolver-programmable. * gnu/packages/networking.scm (perl-net-dns-resolver-programmable): New variable. * gnu/packages/patches/perl-net-dns-resolver-programmable-Fix-broken-interface.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. Signed-off-by: Leo Famulari --- ...esolver-programmable-Fix-broken-interface.patch | 30 ++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 gnu/packages/patches/perl-net-dns-resolver-programmable-Fix-broken-interface.patch (limited to 'gnu/packages/patches') diff --git a/gnu/packages/patches/perl-net-dns-resolver-programmable-Fix-broken-interface.patch b/gnu/packages/patches/perl-net-dns-resolver-programmable-Fix-broken-interface.patch new file mode 100644 index 0000000000..371693dca1 --- /dev/null +++ b/gnu/packages/patches/perl-net-dns-resolver-programmable-Fix-broken-interface.patch @@ -0,0 +1,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] + + +[1] + + +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); -- cgit 1.4.1