http://issues.apache.org/SpamAssassin/show_bug.cgi?id=4648
Summary: Illegal declaration of anonymous subroutine - Rules
starting with digits
Product: Spamassassin
Version: 3.1.0
Platform: All
OS/Version: other
Status: NEW
Severity: enhancement
Priority: P5
Component: Rules
AssignedTo: [email protected]
ReportedBy: [EMAIL PROTECTED]
Custom rule writing is becoming more and more popular. We ran into an issue
today with a rule starting with a number causing a lint failure in an unrelated
file.
To see this yourself, create a new .cf file and add a test rule whose name
starts with a number. Run lint on this rule and it will produce something like:
[500] warn: rules: failed to compile body tests, skipping:
[500] warn: _(Illegal declaration of anonymous subroutine at C:\Perl\Site\Share\
SpamAssassin/20_drugs.cf, rule __DRUGS_DIET7, line 10.
[500] warn: )
On different systems the error message varies:
(Illegal declaration of anonymous subroutine at (no file), rule RADAR, line 10.)
And another system gave us:
[23637] warn: _(Illegal declaration of anonymous subroutine at
/etc/mail/spamassassin/70_sare_oem.cf, rule __OEM_MS_9, line 10.
[23637] warn: )
20_drugs.cf has nothing to do with this lint error, the file at fault was named
00_test.cf
The error message produced by lint also makes it somewhat difficult to track
down what is causing this problem. I'm asking if lint could be enhanced to
catch this better?
I have read someplace (possibly docs) that rules can not start with a number,
I'm not asking for that to change, just that it be more clear when this does
happen why it's happening.
Thank you!
Frederic Tarasevicius
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.