Skip Menu |

This queue is for tickets about the Net-DNS-Resolver-Programmable CPAN distribution.

Report information
The Basics
Id: 109266
Status: resolved
Priority: 0/
Queue: Net-DNS-Resolver-Programmable

People
Owner: Nobody in particular
Requestors: TODDR [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Net::DNS now deprecates the use of make_query_packet
On Fri Nov 20 21:01:15 2015, TODDR wrote: Show quoted text
> https://metacpan.org/source/NLNETLABS/Net-DNS- > 1.03/lib/Net/DNS/Resolver/Base.pm#L1263 > > See also RT https://rt.cpan.org/Public/Bug/Display.html?id=109152 > > This means code will emit Carp messages when used.
Far more importantly, the deprecation is broken, so Net::DNS::Resolver::Programmable fails if Net::DNS 1.03 is installed.
I took a quick look at Net::DNS::Resolver::Programmable.om and the usage of make_query_packet there is for parsing only, so it can easily be replaced/bypassed by instantiating the question directly, i.e. like this: --- Programmable.pm.orig 2007-05-31 00:27:27.000000000 +0200 +++ Programmable.pm 2015-11-23 15:19:04.528411777 +0100 @@ -191,8 +191,7 @@ sub send { my $self = shift; - my $query_packet = $self->make_query_packet(@_); - my $question = ($query_packet->question)[0]; + my $question = Net::DNS::Question->new(@_); my $domain = lc($question->qname); my $rr_type = $question->qtype; my $class = $question->qclass; (patch also attached)
Subject: Programmable-make_query_packet.patch
--- Programmable.pm.orig 2007-05-31 00:27:27.000000000 +0200 +++ Programmable.pm 2015-11-23 15:19:04.528411777 +0100 @@ -191,8 +191,7 @@ sub send { my $self = shift; - my $query_packet = $self->make_query_packet(@_); - my $question = ($query_packet->question)[0]; + my $question = Net::DNS::Question->new(@_); my $domain = lc($question->qname); my $rr_type = $question->qtype; my $class = $question->qclass;
From: rwfranks [...] acm.org
On Fri Nov 20 21:07:41 2015, SKINGTON wrote: Show quoted text
> On Fri Nov 20 21:01:15 2015, TODDR wrote:
> > https://metacpan.org/source/NLNETLABS/Net-DNS- > > 1.03/lib/Net/DNS/Resolver/Base.pm#L1263 > > > > See also RT https://rt.cpan.org/Public/Bug/Display.html?id=109152 > > > > This means code will emit Carp messages when used.
> > Far more importantly, the deprecation is broken, so > Net::DNS::Resolver::Programmable fails if Net::DNS 1.03 is installed.
Net::DNS 1.04 moves the warning to its proper place and make_query_packet() returns the expected result.
I've just taken over maintainership of this module, and this annoying problem is now fixed in 0.004.