SA Bugzilla – Bug 4744
Error: persistent_udp: no such method error message in DnsResolver
Last modified: 2005-12-19 13:55:03 UTC
This error message is seen in a Gentoo system running Net::DNS version 0.40. Lookng in Net::DNS changelog I see that persistent_udp was added in version 0.42. http://search.cpan.org/src/CREIN/Net-DNS-0.44/Changes Our INSTALL says that we require at least 0.36. Mail::SpamAssassin::DnsResolver calls persistent_udp only to disable the feature, so we don't have to bump up the required version if we get rid of the error message.
sidney said: <sidney> jmason: I filed the report but now I'm confused... the call is in a eval block and I don't see an error message when I misname the sub in the call <sidney> not unless I uncomment the 'or warn ...' after the eval block. <sidney> That's in 3.1 branch, but the code doesn't exist in 3.0 so he can't be getting the error there <sidney> Perhaps we fixed that for 3.1.1? I'll try svn blame <sidney> jmason: No, the eval has been there since rev 161778. Do you have any ideas how it an generate an error message? I think I know what's going on -- it's not *actually* causing an error, since the eval{} is catching it and doing the right thing. However due to bug 4631, the error message is "leaked".
btw, for reference -- here's how to determine if an object supports a specific method: if ($obj->can("name_of_method")) { .... } anyway, I think this can be closed as WORKSFORME, if you agree.
Ok, that explains it. We are taking care of suppressing the error by using eval, and the error message he was seeing was caused by bug 4631 which is fixed in svn which he is not running. He can ignore the error message and it runs ok. We can allow the call to persistent_udp to cause the eval block to die because it is the last thing in the eval block. That means that with bug 4631 fixed there is no problem for people who have Net::DNS older than 0.42 installed. Closing this as WORKSFORME.