in reply to Re: Makefile messing up @INC
in thread Makefile messing up @INC

It's messing up my test script. My script uses values from @INC. There should only be 21 entries, but when the script is run (with make test) there are 182. So I am getting a load of errors.

When I run the test script without make, I get the correct 21 entries.

Replies are listed 'Best First'.
Re^3: Makefile messing up @INC
by chromatic (Archbishop) on Jul 26, 2005 at 23:18 UTC

    That sounds like a really fragile test. As long as whoever uses your code has the correct @INC for the machine and environment, why does your code care how it works?

      The @INC is wrong. Out of 182 entries, only 21 are directories that actually exist. One possible solution would be to grep existing directories from @INC.

      But I am wondering why the @INC has invalid directories in it in the first place.