On Sep 17, 11:44am, "Josh Kelley" wrote: } On 4/24/06, David F. Skoll <[EMAIL PROTECTED]> wrote: } > Jonas Eckerman wrote: } > } > > + my $LOCAL_STATE_DIR = '/var/lib'; } > } > That works for FreeBSD, but look at Mail-SpamAssassin's Makefile.PL. } > It contains a subroutine "_set_macro_LOCALSTATEDIR" that supposedly } > sets the default for LOCAL_STATE_DIR. If anyone doesn't think } > SpamAssassin is an evil piece of code, _set_macro_LOCALSTATEDIR should } > remove all remaining doubts. } > } > If/when I find a general-purpose way to detect what the [EMAIL PROTECTED]&$&#$ } > LOCAL_STATE_DIR should be set to for a given SpamAssassin installation, } > I will patch MIMEDefang to use it. If I can't figure it out, I'll } > just use /var/lib. } } sa-update knows what LOCAL_STATE_DIR is, and sa-update is simply Perl } code, so how about just taking its setting of LOCAL_STATE_DIR and } eval'ing it? } } my $LOCAL_STATE_DIR; } my $setlocalstatedir = `grep '^my \$LOCAL_STATE_DIR' /usr/bin/sa-update`; } $setlocalstatedir =~ s/^my //; # Remove leading "my" so that } $LOCAL_STATE_DIR isn't scoped locally to eval block } eval $setlocalstatedir;
If we're looking at this, couldn't we just grab it from SpamAssassin directly, i.e.: my $LOCAL_STATE_DIR = $Mail::SpamAssassin::LOCAL_STATE_DIR; ? I've done similar things to get at other internal variables. }-- End of excerpt from "Josh Kelley" _______________________________________________ NOTE: If there is a disclaimer or other legal boilerplate in the above message, it is NULL AND VOID. You may ignore it. Visit http://www.mimedefang.org and http://www.roaringpenguin.com MIMEDefang mailing list MIMEDefang@lists.roaringpenguin.com http://lists.roaringpenguin.com/mailman/listinfo/mimedefang