Skip Menu |

This queue is for tickets about the Sendmail-PMilter CPAN distribution.

Report information
The Basics
Id: 50144
Status: resolved
Priority: 0/
Queue: Sendmail-PMilter

People
Owner: ZUMMO [...] cpan.org
Requestors: paul [...] city-fan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: 1.20_01



Subject: Dummy functions setdbg and settimeout don't return "success"
The no-op functions setdbg and settimeout have no explicit return value so I believe they return an empty list. Callers of these functions expect a non-zero return value to mean "success", and interpret the empty list as "failure", leading to warnings like "failed to set timeout value". Would it not be better to explicitly return 1 from these functions so that callers get the result they're expecting (as per the attached patch)? Apologies if I've misunderstood something - I'm not a native perl speaker.
Subject: Sendmail-PMilter-0.97-setdbg-settimeout.patch
--- Sendmail-PMilter-0.97/lib/Sendmail/Milter.pm 2004-08-10 22:10:32.000000000 +0100 +++ Sendmail-PMilter-0.97/lib/Sendmail/Milter.pm 2009-09-25 11:34:54.000000000 +0100 @@ -134,10 +134,12 @@ sub setdbg ($) { # no-op + 1; } sub settimeout ($) { # no-op + 1; } 1;
On Thu Oct 01 09:29:44 2009, paul@city-fan.org wrote: Show quoted text
> The no-op functions setdbg and settimeout have no explicit return
value Show quoted text
> so I believe they return an empty list. Callers of these functions > expect a non-zero return value to mean "success", and interpret the > empty list as "failure", leading to warnings like "failed to set
timeout Show quoted text
> value". Would it not be better to explicitly return 1 from these > functions so that callers get the result they're expecting (as per the > attached patch)? > > Apologies if I've misunderstood something - I'm not a native perl
speaker. (This is a copy/paste form letter) Hello bug submitter to Sendmail::PMilter. As you may or may not be aware Sendmail::Pmilter is effectively orphaned. You've opened an issue against it which the current maintainer (me) doesn't have the time/want to solve. See http://search.cpan.org/~avar/Sendmail-PMilter- 0.98/lib/Sendmail/PMilter.pm#Maintenance for more details. But worry not, you can help solve it yourself if you're interested by patching the module in Git and asking for co-maint permission to upload a new version of the module. Even though your fix may seem trivial to you keep in mind that I'd still need to apply / *TEST* / release it. The testing step would require installing Sendmail and I have no interest in doing so ever again. The reason I'm the maintainer in the first place is that I spotted & patched a problem that needed to be solved and then got maintainer permission because the module was orphaned at the time. It's now orphaned again so if you need fixes to it you're going to have top step up and overtake it.
fixed in git.
Sendmail::PMilter does not provide these functions, and Sendmail::PMilter no longer requires the obsolete Sendmail::Milter, which did.