* "Kevin A. McGrail" <[email protected]> [2012-05-19T20:34:00]
> On 5/16/2012 4:30 PM, Ricardo Signes wrote:
> >Here are some options.  I can probably write a patch.
> >
> >* make Makefile.PL decline to configure the dist if PERL5LIB is set
> >* remove the -T from the shebang line of spamd
> >* skip tests that need to run spamd if TEST_PERL_TAINT eq 'no'
> >* other
> >
> >Thanks for the software!
> My thoughts are, by conjecture, I'm assuming the "ancient one" did
> work with local::lib?  What was that version and what option(s) did
> it use above that allowed it to work?

(I am quoting you slightly out of order below.)

It did not.  That version (v3.2.4) was installed before local::lib had gained
much popularity.  It was fun to go back and check, though, and to see all the
deprecation warnings it issues now on 5.16.0-RC2-ish. :)

> But it sounds like all you have to do is remove a single -T and you
> are good so I don't know that this is anything more than an extreme
> edge use that is best handled by your just editing the existing
> source for your needs, no?

My concern isn't so much dealing with what I need -- I've already dealt with
it.  It's with saving time for anybody else who encounters this in the future.

> Overall, though, we can likely look at a patch but this is a pretty
> specific request that isn't very core to the project. My concern is
> the ripple from your change to core needs.

If this use case seems very unlikely to re-occur, I think the simplest change
would be for me to add to Makefile.PL:

  die "Mail::SpamAssassin is not compatible with environments using PERL5LIB"
    if length $ENV{PERL5LIB};

(or if length $ENV{PERL_LOCAL_LIB_ROOT})

The problem, of course, is that there isn't actually a problem if all of the
dist's prereqs are already installed in perl's built-in @INC, and PERL5LIB is
not needed.  The next step, then, would be to tweak Makefile.PL to add a sub
somewhere to My:: to make the fatal error occur only if there are unmet
prereqs if there's a PERL_LOCAL_LIB_ROOT.  In this condition, the CPAN
installer being used will end up installing things to PERL5LIB, where they will
not be findable, so the tests aren't going to find the libraries even if they
get installed.

I think such a patch would only be a few lines.  I'll have a go at it this
week, once some other pressing code has shipped.

-- 
rjbs

Attachment: signature.asc
Description: Digital signature

Reply via email to