Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options

Re: How is the default @INC constructed?

by ikegami (Pope)
on Aug 24, 2004 at 18:42 UTC ( #385474=note: print w/replies, xml ) Need Help??

in reply to How is the default @INC constructed?

I imagine it's built from a constant in is created when perl is built based on compiler flags and whatnot. (And in turn, is used to extract options needed to compile modules.)
  • Comment on Re: How is the default @INC constructed?

Replies are listed 'Best First'.
•Re^2: How is the default @INC constructed?
by merlyn (Sage) on Aug 24, 2004 at 19:30 UTC
    Not quite. How would it find 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.

      *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 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.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://385474]
[marto]: Even with shell command recall I find it less time consuming to do such things in a file.
[marto]: I very seldom use one liners for anything which isn't utterly trivial
[Discipulus]: i'm wise enough to never use my oneliners
[Discipulus]: anyway marto, i read th CB logs.. osteopat is what you need

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (7)
As of 2017-09-22 08:36 GMT
Find Nodes?
    Voting Booth?
    During the recent solar eclipse, I:

    Results (260 votes). Check out past polls.