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" ( "


--
 John Hardin KA7OHZ                    http://www.impsec.org/~jhardin/
 jhar...@impsec.org    FALaholic #11174     pgpk -a jhar...@impsec.org
 key: 0xB8732E79 -- 2D8C 34F4 6411 F507 136C  AF76 D822 E6E6 B873 2E79
-----------------------------------------------------------------------
  Men by their constitutions are naturally divided in to two parties:
  1. Those who fear and distrust the people and wish to draw all
  powers from them into the hands of the higher classes. 2. Those who
  identify themselves with the people, have confidence in them,
  cherish and consider them as the most honest and safe, although not
  the most wise, depository of the public interests.
                                                  -- Thomas Jefferson
-----------------------------------------------------------------------
 15 days until Bill of Rights day

Reply via email to