You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Perl Net::DNS 1.35版本Resolver查询失败求助

Net::DNS 1.35版本在Linux 5.15下报错求助

我正在测试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

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.07 13:55:19