Perl Net::DNS 1.35版本Resolver查询失败求助
我正在测试CPAN上的Net::DNS新版本(1.35),在Net/DNS/Resolver/Base.pm文件第987行出现报错,错误信息如下:
*** FATAL PROGRAM ERROR!! Unknown instance method 'size'
*** which the program has attempted to call for the object:. IN OPT ; no data
*** THIS IS A BUG IN THE CALLING SOFTWARE, which incorrectly assumes
*** that the object would be of a particular type. The type of an
*** object should be checked before calling any of its methods.Net::DNS::RR 1714 at Net/DNS/Resolver/Base.pm line 987.
Net::DNS::Resolver::Base::_make_query_packet(Net::DNS::Resolver=HASH(0x55ebcfcd3d68), "example.com") called at Net/DNS/Resolver/Base.pm line 402
Net::DNS::Resolver::Base::send(Net::DNS::Resolver=HASH(0x55ebcfcd3d68), "example.com") called at Net/DNS/Resolver/Base.pm line 374
该问题仅出现在Linux 5.15版本上,Linux 5.10版本测试则正常,我无法定位原因。以下是我运行的代码片段(基于Perl 5.26):
use Test::Simple; use Net::DNS; my $resolver = new Net::DNS::Resolver(); my $packet = $resolver->query('example.com'); ok($packet->answersize > 0, "NET::DNS");
请问有人遇到过这个问题吗?
内容的提问来源于stack exchange,提问作者user1712584

