http://www.perlmonks.org?node_id=385492


in reply to Re: How is the default @INC constructed?
in thread How is the default @INC constructed?

Not quite. How would it find Config.pm without knowing the @INC?

The answer, as others have said, is that @INC is built in to the Perl binary, so you can't change it without recompiling the binary.

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

  • Comment on •Re^2: How is the default @INC constructed?

Replies are listed 'Best First'.
Re^3: How is the default @INC constructed?
by ikegami (Patriarch) on Aug 24, 2004 at 20:19 UTC

    *sigh* Too true. I must have bonked myself on the head too many times.

    Are some generated instead of being hardcoded? I orignally installed my ActiveState perl in R:\U, but recently moved it to R:\Utils (without reinstalling), and I get:

    >perl -le "$,=', '; print @INC" r:/Utils/perl/lib, r:/Utils/perl/site/lib, .

    I did have to edit Config.pm for PPM to work in the new directory.

      They appear to be, ap rime example is are win32 builds (can;t assume you mean win32 by activestate because they offer solaris and linux too). But if you try IndigoPerl and run it with -V it's likely to spew things which have no relevance to your machine, and yet it manages to run just fine (though error messages about "use" can be b0rked)

      --
      I'm not belgian but I play one on TV.