Bug 4744 - Error: persistent_udp: no such method error message in DnsResolver
Summary: Error: persistent_udp: no such method error message in DnsResolver
Status: RESOLVED WORKSFORME
Alias: None
Product: Spamassassin
Classification: Unclassified
Component: Building & Packaging (show other bugs)
Version: SVN Trunk (Latest Devel Version)
Hardware: Other All
: P5 normal
Target Milestone: Undefined
Assignee: SpamAssassin Developer Mailing List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-12-19 20:36 UTC by Sidney Markowitz
Modified: 2005-12-19 13:55 UTC (History)
0 users



Attachment Type Modified Status Actions Submitter/CLA Status

Note You need to log in before you can comment on or make changes to this bug.
Description Sidney Markowitz 2005-12-19 20:36:43 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.
Comment 1 Justin Mason 2005-12-19 21:16:19 UTC
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".
Comment 2 Justin Mason 2005-12-19 21:18:12 UTC
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.
Comment 3 Sidney Markowitz 2005-12-19 22:55:03 UTC
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.