[net-dns-users] Release candidate for Net::DNS 1.06

Dick Franks rwfranks at acm.org
Wed Apr 20 00:16:18 UTC 2016


On 19 April 2016 at 19:58, Doug Barton <dougb at dougbarton.us> wrote:

> On 04/19/2016 08:39 AM, Dick Franks wrote:
>
> 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.
>

We appear to have a problem establishing simple matters of fact.

Slightly modifying my previous snippet:

        print 'Net::DNS ', Net::DNS->version, "\n";
        my $resolver = Net::DNS::Resolver->new();
        $resolver->nameserver('ns.net-dns.org');

        my @zone = eval { $resolver->axfr('net-dns.org') };
        print scalar(@zone), "\n";
        my $errorstring = $resolver->errorstring;
        print "errorstring is ", defined($errorstring) ? "defined\n" :
"undefined\n";

gives

        Net::DNS 1.05
        2648
        errorstring is defined
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nlnetlabs.nl/pipermail/net-dns-users/attachments/20160420/36083baa/attachment.htm>


More information about the net-dns-users mailing list