You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spamassassin.apache.org by fe...@apache.org on 2006/12/06 18:24:15 UTC
svn commit: r483155 - in /spamassassin/trunk/lib/Mail/SpamAssassin: Conf.pm
Conf/Parser.pm
Author: felicity
Date: Wed Dec 6 09:24:08 2006
New Revision: 483155
URL: http://svn.apache.org/viewvc?view=rev&rev=483155
Log:
bug 5200: add in documentation about the new else statement
Modified:
spamassassin/trunk/lib/Mail/SpamAssassin/Conf.pm
spamassassin/trunk/lib/Mail/SpamAssassin/Conf/Parser.pm
Modified: spamassassin/trunk/lib/Mail/SpamAssassin/Conf.pm
URL: http://svn.apache.org/viewvc/spamassassin/trunk/lib/Mail/SpamAssassin/Conf.pm?view=diff&rev=483155&r1=483154&r2=483155
==============================================================================
--- spamassassin/trunk/lib/Mail/SpamAssassin/Conf.pm (original)
+++ spamassassin/trunk/lib/Mail/SpamAssassin/Conf.pm Wed Dec 6 09:24:08 2006
@@ -2358,10 +2358,10 @@
=item if (conditional perl expression)
-Used to support conditional interpretation of the configuration file. Lines
-between this and a corresponding C<endif> line, will be ignored unless the
-conditional expression evaluates as true (in the perl sense; that is, defined
-and non-0).
+Used to support conditional interpretation of the configuration
+file. Lines between this and a corresponding C<else> or C<endif> line,
+will be ignored unless the conditional expression evaluates as true
+(in the perl sense; that is, defined and non-0).
The conditional accepts a limited subset of perl for security -- just enough to
perform basic arithmetic comparisons. The following input is accepted:
@@ -2409,6 +2409,13 @@
=item ifplugin PluginModuleName
An alias for C<if plugin(PluginModuleName)>.
+
+=item else
+
+Used to support conditional interpretation of the configuration
+file. Lines between this and a corresponding C<endif> line,
+will be ignored unless the conditional expression evaluates as false
+(in the perl sense; that is, not defined and 0).
=item require_version n.nnnnnn
Modified: spamassassin/trunk/lib/Mail/SpamAssassin/Conf/Parser.pm
URL: http://svn.apache.org/viewvc/spamassassin/trunk/lib/Mail/SpamAssassin/Conf/Parser.pm?view=diff&rev=483155&r1=483154&r2=483155
==============================================================================
--- spamassassin/trunk/lib/Mail/SpamAssassin/Conf/Parser.pm (original)
+++ spamassassin/trunk/lib/Mail/SpamAssassin/Conf/Parser.pm Wed Dec 6 09:24:08 2006
@@ -324,6 +324,7 @@
}
if ($key eq 'else') {
+ # TODO: if/else/else won't get flagged here :(
if (!@if_stack) {
$parse_error = "config: found else without matching conditional";
goto failed_line;