On Sat, Nov 20, 2021 at 07:50:02PM -0500, Tom Lane wrote:
> Noah Misch <[email protected]> writes:
> > Yep.  wrasse sets PERL to a manually-installed Perl, but PROVE still uses an
> > old Perl.  I'll fix that somehow.
> 
> A quick workaround is to set PROVE in the animal's config_env, but
> I don't think that's ideal, because configure then skips module
> presence tests:
> 
>   # Check for necessary modules, unless user has specified the "prove" to use;
>   # in that case it's her responsibility to have a working configuration.
>   # (prove might be part of a different Perl installation than perl, eg on
>   # MSys, so the result of AX_PROG_PERL_MODULES could be irrelevant anyway.)

The skip would be unnecessary if configure just tested whether $PROVE can run
a test requiring the module.  We're testing $PERL, but we're actually
indifferent to $PERL's Test::More.

> What I'm inclined to do is temporarily push `dirname $PERL` onto the front
> of PATH while running
> 
>   PGAC_PATH_PROGS(PROVE, prove)

Adding to PATH, even briefly, is way too brazen.  You'd need to be sure that
PATH is never searched for anything other than "prove", which is hard to
ensure in a shell script.  Explicitly testing $(dirname "$PERL")/prove could
be okay.  It feels inappropriately magical to me, but perhaps it's the right
thing.  I'd be -1 on a back-patch and -0.7 for HEAD.


Reply via email to