On Sat, Jan 03, 2015 at 10:43:49PM -0700, Bob Proulx wrote:
> 
> Maybe someone else will come up with a better documentation pointer
> for variables expanded inside Perl strings.

Umm.. (sorry) for once Reindl is somewhat correct. We are writing rules
using _SpamAssassin_, not coding Perl.  What low-level regex/variables do in
any language is meaningless in this context as SpamAssassin might manipulate
things in any number of ways.  Quoting requirements and other strange things
should be documented in SpamAssassin, but at a quick glance nothing is
mentioned about @, only # is referred as needing quoting.  So documentation
could use an update.

Anyway, atleast --lint complains for me if using bad syntax, so it should be
a clear indicator if something requires attention..

$ spamassassin --lint
Jan  4 10:34:06.520 [6260] warn: Possible unintended interpolation of @baz in 
string at /usr/local/perl/etc/mail/spamassassin/test.cf, rule TEST_1, line 1, 
<GEN0> line 17.
Jan  4 10:34:06.527 [6260] warn: rules: failed to compile 
Mail::SpamAssassin::Plugin::Check::_body_tests_0_3, skipping:
Jan  4 10:34:06.528 [6260] warn:  (Global symbol "@baz" requires explicit 
package name at /usr/local/perl/etc/mail/spamassassin/test.cf, rule TEST_1, 
line 1, <GEN0> line 17.)
Jan  4 10:34:06.770 [6260] warn: lint: 1 issues detected, please rerun with 
debug enabled for more information

Reply via email to