You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@spamassassin.apache.org by Michael Parker <pa...@pobox.com> on 2004/02/23 21:10:38 UTC

Re: svn commit: rev 6783 - in incubator/spamassassin/trunk: . lib/Mail/SpamAssassin

On Thu, Feb 19, 2004 at 10:59:35PM -0000, jm@apache.org wrote:
> 
> Added: incubator/spamassassin/trunk/lib/Mail/SpamAssassin/Constants.pm
> ==============================================================================
> --- (empty file)
> +++ incubator/spamassassin/trunk/lib/Mail/SpamAssassin/Constants.pm	Thu Feb 19 14:59:35 2004
> @@ -0,0 +1,113 @@
> +# Constants used in many parts of the SpamAssassin codebase.

Would anyone mind if I turned this into a more complete Constants
file?  Something that would make use of use constant, export certain
variables and use export tags?  We could then refer to things as true
constants rather than variables in the Mail::SpamAssassin package.

Michael

Re: svn commit: rev 6783 - in incubator/spamassassin/trunk: . lib/Mail/SpamAssassin

Posted by Michael Parker <pa...@pobox.com>.
On Mon, Feb 23, 2004 at 01:17:21PM -0800, Justin Mason wrote:
> 
> (a) I'm not sure if "use constant" consts can be used outside of the
> declaring file.  This is a perl bug.   It may work with EXPORT though,
> I haven't checked....

I've used this lots in various projects.  See my followup patch.

> (b) there's a question as to whether we might wind up polluting the
> global namespace with our versions of IP_ADDRESS, et al, for users
> of Mail::SpamAssassin.  In that case, this would be bad manners
> and not a good idea.

This is easily solved by prepending our constants with SA_

Michael

Re: svn commit: rev 6783 - in incubator/spamassassin/trunk: . lib/Mail/SpamAssassin

Posted by Michael Parker <pa...@pobox.com>.
On Mon, Feb 23, 2004 at 02:10:38PM -0600, Michael Parker wrote:
> On Thu, Feb 19, 2004 at 10:59:35PM -0000, jm@apache.org wrote:
> > 
> > Added: incubator/spamassassin/trunk/lib/Mail/SpamAssassin/Constants.pm
> > ==============================================================================
> > --- (empty file)
> > +++ incubator/spamassassin/trunk/lib/Mail/SpamAssassin/Constants.pm	Thu Feb 19 14:59:35 2004
> > @@ -0,0 +1,113 @@
> > +# Constants used in many parts of the SpamAssassin codebase.
> 
> Would anyone mind if I turned this into a more complete Constants
> file?  Something that would make use of use constant, export certain
> variables and use export tags?  We could then refer to things as true
> constants rather than variables in the Mail::SpamAssassin package.
> 

More precise, something like the attached.  Ignore the Bayes stuff.

Michael