On 2014-11-30 17:16, John Hardin wrote:
On Sun, 30 Nov 2014, jdow wrote:

On 2014-11-30 14:29, John Hardin wrote:
 On Sun, 30 Nov 2014, jdow wrote:

> >   On Sun, 30 Nov 2014, Benny Pedersen wrote:
> > >   On 30. nov. 2014 22.15.12 John Hardin <jhar...@impsec.org> wrote:
> > > > >        if version > 3.004001
> > > >          if perl_version >= 5.010000
> > > >            body NON_588_COMPATIBLE_RE_SYNTAX /\w++/
> > > >          endif
> > > >        endif
> > > >   If this works now in spamassassin 3.3.2, problem solved, can i > >
> >   send >
> >  bitcoins
> > >   somewhere ? :)
> > > >   It "works" in 3.3.2 *IF* you accept the warning about > >
perl_version being non-numeric that this entire thread is about. > >   The
non-5.8.8-compatible RE is skipped, because the perl_version > >
conditional fails to false on the type warning and doesn't > >   include the
rule.
> >  Would a corrected syntax version of this work?
> >  if version > 3.004001 && perl_version >= 5.010000
>    body NON_588_COMPATIBLE_RE_SYNTAX /\w++/
>  endif

 Yes. That *does* work.

 Thank you! I think you just solved it.

Here is another idea that might be helpful if....

    if ((ref( perl_version ) == SCALAR ) && (perl_version >= 5.010000))
        body yatta yatta
    endif

The SA if() conditional only supports a very limited subset of the perl syntax,
otherwise the perl_version change wouldn't have been needed in the first place,
we could just check $] or $^V directly.

So, that doesn't work:

Nov 30 17:14:09.267 [18334] warn: config: error in if - ( ( "ref" ( "fnord_var"
) == "SCALAR" ) && ( "fnord_var" >= 5.010000 ) ) : syntax error at (eval 2556)
line 1, near ""ref" ( "

OK, would this work? Use the fact that the thing defaults to a string. I would "guess" the value would be "perl_version".

    if (( perl_version != "perl_version" ) && ( perl_version >= 5.010000 ))
        bad stuff
    endif

{^_^}

Reply via email to