[net-dns-users] Release candidate for Net::DNS 1.06
Doug Barton
dougb at dougbarton.us
Tue Apr 19 18:58:11 UTC 2016
On 04/19/2016 08:39 AM, Dick Franks wrote:
>
> On 19 April 2016 at 06:38, Doug Barton <dougb at dougbarton.us
> <mailto:dougb at dougbarton.us>> wrote:
> However the errorstring for AXFR is now empty (not undefined,
> there is actually a string there, but it seems to be one, or maybe
> two spaces.
>
>
> If you are going to persist with this argument, at least do us the
> courtesy of citing verifiable facts.
>
> my $resolver = Net::DNS::Resolver->new();
> $resolver->nameserver('185.49.140.63');`
> $resolver->domain('net-dns.org <http://net-dns.org>');
>
> my @zone = eval { $resolver->axfr() };
> print scalar(@zone), "\n";
> my $errorstring = $resolver->errorstring;
> print length($errorstring), "\t$errorstring\n";
>
> produces
>
> 2648
> 0
You focused on the wrong part of what I said. Previous to this RC
errorstring was undefined, which allowed me to wrap my previous code in
an 'if (defined ...' block. Now it's defined, but empty (or has spaces,
or doesn't, whatever). That's much worse, as now I have to do a string
compare.
> This is a regression against both 1.05 and versions previous to the
> errorstring nuking (1.04?). The demo script I sent to the list
> previously can demonstrate the problem. Also the output from that
> script that I sent along with it shows the previous output for
> errorstring after AXFR for both 1.05 and 0.81.
>
>
> 0.81
>
> 2648
> 25 unknown error or no error
>
> axfr() did not modify errorstring in any way at all.
I'm not sure how you're using the word "modify" in that sentence. In any
case, what you printed out above shows what I've been saying all along.
In previous versions errorstring was populated after a successful AXFR.
In my opinion that state of affairs should be maintained. However we
have gone from:
prior to 1.05 (or is it 1.04?) defined and populated
1.05 undefined
1.06-RC1 defined, but not populated
So we're getting worse instead of better.
> It is easy to demonstrate that if other values occur in errorstring they
> were left over from a previous query, which is downright unhelpful.
I agree that errorstring should be cleared before each new call to the
resolver object. In fact I would be surprised if it wasn't. However in
both your demo above, and in my functional script, the ONLY use of the
resolver object is the AXFR. So I'm hard pressed to see how this comment
relates.
> Worse, the documentation implied that errorstring() relates to axfr(),
> which it clearly does not, and never did.
So how is it getting filled in previous versions?
Doug
More information about the net-dns-users
mailing list