On Mi. 17. Sep. 2008, 13:01:23, HARDAKER wrote:
Show quoted text> fixed in next release.
Thanks!
However, I now get warnings from Net::DNS:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
zoneedit@dns0:/tmp > cat 39362
#!/usr/bin/perl -w
use Net::DNS::ZoneFile::Fast;
Net::DNS::ZoneFile::Fast::parse(
fh => \*DATA,
origin => 'example.org',
);
__DATA__
test IN MX 0 .
zoneedit@dns0:/tmp > ./39362
Use of uninitialized value $name in scalar chop at
/usr/lib/perl5/Net/DNS.pm line 473, <DATA> line 1.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Here's a stacktrace:
# main::__ANON__('Use of uninitialized value $name in scalar
chop at /usr/lib/p...') called at /usr/lib/perl5/Net/DNS.pm line 473
# Net::DNS::stripdot('') called at
/usr/lib/perl5/Net/DNS/RR/MX.pm line 82
#
Net::DNS::RR::MX::_normalize_dnames('Net::DNS::RR::MX=HASH(0xa63e710)')
called at /usr/lib/perl5/Net/DNS/RR.pm line 473
# Net::DNS::RR::new_from_hash('Net::DNS::RR', 'preference', 0,
'ttl', 0, 'name', 'test.example.org', 'class', 'IN', ...) called at
/usr/share/perl5/Net/DNS/ZoneFile/Fast.pm line 193
# Net::DNS::ZoneFile::Fast::parse('fh', 'GLOB(0xa0b05b8)',
'origin', 'example.org') called at /tmp/edit.zone line 7
So the problem is that Net::DNS::RR->new_from_hash() is called with an
empty value for exchange and that it does not really seem to like that.
One could argue that it should treat that equal to "." (and maybe I'll
open a bug report for Net::DNS, too), but on the other hand the warning
could be avoided by not stripping the trailing dot from the exchange
before calling Net::DNS::RR->new_from_hash().
(I wonder if there is any good reason for stripping it, anyway, because
the documentation for Net::DNS::RR states: "All names must be fully
qualified. The trailing dot (.) is optional.")
BTW: I get the same warnings when running the test suite for
Net::DNS::ZoneFile::Fast in conjunction with the current version 0.65 of
Net::DNS.
Kind regards,
fany