Skip Menu |

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

Report information
The Basics
Id: 5532
Status: resolved
Priority: 0/
Queue: Net-DNS

People
Owner: rt-cpan [...] triv.org
Requestors: luismunoz [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in:
  • 0.45
  • 0.45_01
  • 0.46
Fixed in: (no value)



Subject: Non backwards-compatible change in Net-DNS-0.44 and beyond
Net::DNS::Packet v0.44 included a function that I suggested and provided, called ->safe_push(), which does the same as Net::DNS::Update->safe_push(). This method should exist in ::Packet because it is important for name servers to insure that no redundant RRs are included in all responses, not only on updates. Having it in ::Packet, its services would be available in any sub-class, including ::Update. This change breaks, at least, Net::DNS::Method (See ticket #5479). Best regards. -lem
From: Chris Reinhardt <chris [...] dyndns.org>
Subject: Re: [cpan #5532] Non backwards-compatible change in Net-DNS-0.44 and beyond
Date: Tue, 2 Mar 2004 19:36:04 -0500
To: bug-Net-DNS [...] rt.cpan.org
RT-Send-Cc:
On Mar 2, 2004, at 3:52 PM, via RT wrote: Show quoted text
> > This method should exist in ::Packet because it is important for name > servers to insure that no redundant RRs are included in all responses, > not only on updates. Having it in ::Packet, its services would be > available in any sub-class, including ::Update.
It might come back, but an implementation would need to be found that did not invoke the speed penalty that safe_push brought on. Tracking which RRs are in the packet is work not needed for most tasks. I am against a speed reduction for the majority of users to suit the needs of a minority. Patches welcome. Show quoted text
> This change breaks, at least, Net::DNS::Method (See ticket #5479).
Gah. What a horrible name for a module. -- Chris Reinhardt -- chris@dyndns.org -- http://www.dyndns.org/ Always do sober what you said you'd do drunk. That will teach you to keep your mouth shut. --Ernest Hemingway
From: LUISMUNOZ
I haven't seen an aswer to this, so I post it here just in case... n-Reply-To: <rt-5532-16416.18.0712218906679@cpan.org> References: <rt-5532-16416.18.0712218906679@cpan.org> Message-Id: <29781870-6CC5-11D8-A3EC-000393669158@cpan.org> Content-Transfer-Encoding: 7bit From: Luis E. Muñoz <luismunoz@cpan.org> Subject: Re: [cpan #5532] Non backwards-compatible change in Net-DNS-0.44 and beyond Date: Tue, 2 Mar 2004 23:45:06 -0400 To: comment-Net-DNS@rt.cpan.org Hi Chris: My answers below. On Mar 2, 2004, at 8:36 PM, chris@dyndns.org via RT wrote: Show quoted text
> Full context and any attached attachments can be found at: > <URL: http://rt.cpan.org/NoAuth/Bug.html?id=5532 > > > > On Mar 2, 2004, at 3:52 PM, via RT wrote:
>> >> This method should exist in ::Packet because it is important for name >> servers to insure that no redundant RRs are included in all responses, >> not only on updates. Having it in ::Packet, its services would be >> available in any sub-class, including ::Update.
> > It might come back, but an implementation would need to be found that > did not invoke the speed penalty that safe_push brought on. Tracking > which RRs are in the packet is work not needed for most tasks. I am > against a speed reduction for the majority of users to suit the needs > of a minority. > > Patches welcome.
This new incarnation ->safe_push in Net::DNS::Packet should do the trick: sub safe_push { my ($self, $section, @rrs) = @_; foreach my $rr (@rrs) { next if $self->{'seen'}->{$rr->string}; $self->{'seen'}{$_->string}++; $self->push($section, $rr); } } with the caveat (in the documentation) that applications that wish to have the benefits of ->safe_push() should refrain from using ->push() in the same Net::DNS::Packet. Note that this is simply moving the housekeeping present in Net::DNS::Packet 0.42 into safe_push. Please let me know if this is going in the distribution and on which version, so that I can review my code prerequisites. Show quoted text
>> This change breaks, at least, Net::DNS::Method (See ticket #5479).
> > Gah. What a horrible name for a module.
Well, it does its work well enough that 2 million people do not complain :) But patches welcome too :D Actually it is interesting. Perhaps you might like to take a peek, as together with Net::DNS::Server, it provides an alternative framework for your Net::DNS::Nameserver. Best regards and thanks for your quick reply. -lem
[guest - Thu Mar 4 10:02:38 2004]: Show quoted text
> I haven't seen an aswer to this, so I post it here just in case...
I replied to your comments, but RT seems to have not sent you a copy (I think it ended up as a comment). See https://rt.cpan.org/Ticket/Display.html?id=5532 for my reply.
From: Chris Reinhardt <chris [...] dyndns.org>
Subject: Re: [cpan #5532] Non backwards-compatible change in Net-DNS-0.44 and beyond
Date: Thu, 4 Mar 2004 17:39:26 -0500
To: bug-Net-DNS [...] rt.cpan.org
RT-Send-Cc:
I believe I have now slain the RT gremlins. Hopefully. On Mar 2, 2004, at 10:44 PM, via RT wrote: Show quoted text
> This new incarnation ->safe_push in Net::DNS::Packet should do the > trick: > > sub safe_push > { > my ($self, $section, @rrs) = @_; > > foreach my $rr (@rrs) { > next if $self->{'seen'}->{$rr->string}; > $self->{'seen'}{$_->string}++; > $self->push($section, $rr); > } > } > > with the caveat (in the documentation) that applications that wish to > have the benefits of ->safe_push() should refrain from using ->push() > in the same Net::DNS::Packet. Note that this is simply moving the > housekeeping present in Net::DNS::Packet 0.42 into safe_push. Please > let me know if this is going in the distribution and on which version, > so that I can review my code prerequisites.
I'm not in love with having a half-broken safe_push() in the module. Then again, I'm not convinced of the need for safe_push to begin with. Then again, I realize that I'm quickly turning into a pedantic old man in this thread. Show quoted text
> Well, it does its work well enough that 2 million people do not > complain :) But patches welcome too :D Actually it is interesting. > Perhaps you might like to take a peek, as together with > Net::DNS::Server, it provides an alternative framework for your > Net::DNS::Nameserver.
Interesting that Net::DNS::Method seems to have more users than Net::DNS. I wonder how you pull that off. Seriously though, I'm am not questioning the idea or implementation, merely the name. If you have to look at the docs to figure out what a module does, you need a better name. As Net::DNS::Method seems to be bits of business logic for Net::DNS::Server, I would think that it belongs inside the Net::DNS::Server namespace. Than again, I try to rule the Net::DNS namespace with an iron first. Net::DNS::Nameserver isn't mine (Mike Fuhr wrote it, I just look after it). It was never intended for serious work, but that doesn't seem to have stopped people. :) -- Chris Reinhardt -- chris@dyndns.org -- http://www.dyndns.org/ If Stupidity got us into this mess, then why can't it get us out? --Will Rogers