https://issues.apache.org/SpamAssassin/show_bug.cgi?id=7107

--- Comment #6 from John Hardin <[email protected]> ---
(In reply to Kevin A. McGrail from comment #5)
> (In reply to Benny Pedersen from comment #4)
> > (In reply to Kevin A. McGrail from comment #2)
> > > Might be easier and safer to include a function that takes a parameter of
> > > min version perl and then returns 1/0 if version is equal or greater.
> > 
> > was it not max perl version here ?
> 
> I do not think so. I'm thinking the variable is the minimum perl version
> that works for the if loop.

Correct.

> By using the "can" functionality, this should work for old versions of SA
> seamlessly to ignore the functionality as well as new versions.

Using "perl_version" does the same at the cost of a warning at startup, and I
think "perl_version" is much neater (and simpler, but I haven't looked at the
code yet) than a can() as you suggest.

> Theory is that old versions of SA won't have the function and will always
> fail. 

I tested that as I was composing this bug. "IF perl_version >= 5.010000" emits
a warning about perl_version and skips the block, so it should be fail-safe for
old releases of SA and should start working automatically once perl_version
gets defined.

The can() approach would be preferred if we really don't want the warning, but
I prefer perl_version even with the warning because it's terse, unambiguous and
complements the existing "version" var.

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to