You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@spamassassin.apache.org by Justin Mason <jm...@jmason.org> on 2004/02/23 22:17:21 UTC

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

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


Michael Parker writes:
> 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.

Two things:

(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....

(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.

- --j.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)
Comment: Exmh CVS

iD8DBQFAOm3hQTcbUG5Y7woRAqIzAJ9xCa9IF/ynTGsCDNrFmrqDNJ6pGACeOlJE
INfcb+DUo2/sVM5sx4R68m8=
=GAJV
-----END PGP SIGNATURE-----


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