in reply to Makefile messing up @INC

Any -I on the command line gets added to @INC, as will any subdirectories that also match the architecture. Why do you care if there are many entries in @INC?

-- Randal L. Schwartz, Perl hacker
Be sure to read my standard disclaimer if this is a reply.

Replies are listed 'Best First'.
Re^2: Makefile messing up @INC
by jacques (Priest) on Jul 26, 2005 at 22:58 UTC
    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.

      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.