On Mon, 1 Dec 2014, Bob Proulx wrote:

John Hardin wrote:
Burnie wrote:
John Hardin wrote:
jdow wrote:
 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.

Define work...

if version > 3.004001 && perl_version >= 5.010000
body NON_588_COMPATIBLE_RE_SYNTAX /\w++/
endif

# spamassassin --lint
Dec  1 15:03:50.365 [28224] warn: Argument "perl_version" isn't numeric in
numeric ge (>=) at (eval 2520) line 2.

Dammit. I ran it (against trunk) here (with a different pseudo-var name, and
using version > 9) and did *not* get a type warning!

Regarding this syntax I just ran a test here with exactly that
syntax in Debian Wheezy Stable.

 $ spamassassin --version
 SpamAssassin version 3.3.2
   running on Perl version 5.14.2

 if version > 3.004001 && perl_version >= 5.010000
   meta    PDS_FROM_2_EMAILS       __PDS_FROM_2_EMAILS && !__VIA_ML && 
!__VIA_RESIGNER
 endif

 if version > 3.004001 && perl_version >= 5.010000
   header  __PDS_FROM_2_EMAILS     From =~ 
/^\W+([\w+.-]+\@[\w.-]+\.\w\w++)(?:[^\n\w<]{0,80})?<(?!\1)[^\n\s]*\@/i
 endif

This produced no lint warnings with the above combination.  I am
missing why it is causing problems in Burnie's configuration.  Is
3.3.1 really that different here from 3.3.2 which is silent?

I did a quick troll through the SVN history but nothing leapt out at me. However, I'm not that familiar with the parser.

I can confirm 3.2.5 *does* generate a lint warning with that syntax (an old VM I have).

Could somebody else running 3.3.1 confirm Burnie's results?

--
 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
-----------------------------------------------------------------------
  ...the good of having the government prohibited from doing harm
  far outweighs the harm of having it obstructed from doing good.
                                                   -- Mike@mike-istan
-----------------------------------------------------------------------
 14 days until Bill of Rights day

Reply via email to