TH 3.15 Ate My Brain and Broke My Tests
Eric Wilhelm
scratchcomputing at gmail.com
Tue Jan 27 00:03:31 GMT 2009
# from Alex Vandiver
# on Monday 26 January 2009 14:28:
>r1244 is the culprit here.
Hmm. From reading the commit message, I'm inclined to think that this
change had the wrong goal. The subprocess should see the same
environment as the parent, not the same @INC.
>My totally naive solution (and testcase) is attached, but the commit
>message on r1244 implies I may be barking up the wrong tree.
It seems like this comment might better read "Change PERL5LIB"
# Change @INC so we ensure it's preserved.
$ENV{PERL5LIB} = "wibble:$ENV{PERL5LIB}";
But otherwise looks like a decent change. I still worry about the
legacy of 1244, but I already went over all of that once long ago.
------------------------------------------------------------------------
>>r1244 | schwern | 2008-11-12 02:55:09 -0800 (Wed, 12 Nov 2008)
>>Solve the "-Ifoo bar" problem by cleaning up how we handle @INC
>>propagation.
>>First, effectively ignore PERL5LIB. Anything in it is already in
>>@INC. This means setting PERL5LIB and then running Test::Harness no
>>longer changes @INC but I think that's ok. It makes life a lot
>>simpler to just pass along our @INC to the child rather than some
>>hybrid of @INC and PERL5LIB.
>>This means _apply_extra_INC() becomes simpler, it just has to pass on
>>_filtered_inc() as switches.
>>Strip all the -I switches out of @switches. This eliminates doubling
>>up of entries in @switches and entries generated from @libs.
>>Now that tests no longer reflect their parent's PERL5LIB, just their
>>@INC, a lot of the @INC propogation tests can be removed.
>>Finally, add a check to the taint test that it can deal well with
>>"-Ifoo bar"
------------------------------------------------------------------------
--Eric
--
"Because understanding simplicity is complicated."
--Eric Raymond
---------------------------------------------------
http://scratchcomputing.com
---------------------------------------------------
More information about the tapx-dev
mailing list