Subject: | Net::DNS::RR::Key has wrong inheritence, $rr->print doesn't work |
The Net::DNS::RR::Key class was changed in .66 to be a subclass of
Net::DNS::RR::DNSKEY.
With this change, the Net::DNS::RR::Key objects have been broken.
Take the following code for example:
my $rr = Net::DNS::RR->new('zone.com IN KEY 256 3 5 AwEA');
$rr->print;
This prints:
zone.com. 0 IN KEY ; rdlength = 0
When it should print:
zone.com. 0 IN KEY 256 3 5 (
AwEA
) ; Key ID = 1798
It looks like the problem is the inheritance order for the
Net::DNS::RR::Key object. Its @ISA looks like this:
@ISA = qw(Net::DNS::RR Net::DNS::RR::DNSKEY);
When it should really look like this:
@ISA = qw(Net::DNS::RR::DNSKEY Net::DNS::RR);
After changing it around and rerunning the above perl code, I get the
correct output.
Tested on Perl v5.8.9