[net-dns-users] Dual-faced Net::DNS?
Doug Barton
dougb at dougbarton.us
Mon Jan 7 20:16:59 UTC 2013
On 01/07/2013 09:24 AM, Chris Buxton wrote:
>
> On Jan 7, 2013, at 2:10 AM, Calle Dybedahl wrote:
>> On 20 dec 2012, at 16:58, Dick Franks <rwfranks at acm.org
>> <mailto:rwfranks at acm.org>> wrote:
>>
>>> IMHO the secondary mission would be better served by a separate
>>> purpose-built test tool distribution, driven by users who need it,
>>> and which would not be routinely redistributed as part of general
>>> purpose Linux distributions.
>>
>> Anyway. Here's a suggestion: Instead of splitting off a special test
>> tool distribution, let's give Net::DNS two faces. One nice, friendly,
>> helpful and as far as possible optimized for the common case. One raw,
>> unvarnished and unforgiving and aimed at making possible all the weird
>> things nobody's thought of before. Possibly, the first could be built
>> on top of the second. Or not, depending on what's easiest.
>
> Personally, I don't see the usefulness of the "friendly" version. Give
> me the raw data and then (if desired) give me helper routines to convert
> it to a friendlier version, if that's what I want to do. Don't give me
> the interpreted version and make me undo what you've done.
>
> For example, I'd really appreciate it if the
> Net::DNS::RR::SOA::format_rdata() didn't add comments and didn't break
> the data across multiple lines.
Agreed ... I have to track down how these changes have impacted one of
my scripts that parses SOAs, just haven't gotten to it yet or I would
have sent in a complaint myself.
Chris' suggestion of keeping the old format plus adding helper functions
to parse them is a good combination of maximum compatibility + maximum
helpfulness. Another option would be that the old method returns the
data in the old raw format, and a new method could be added to return
data in the post-processed (cooked?) format.
Either way, changing the format of returned data structures that have
been stable for many years is a POLA violation.
Doug
More information about the net-dns-users
mailing list