ismail has asked for the wisdom of the Perl Monks concerning the following question:

What file do I edit to populate @INC? I want to add and remove things system-wide, so no '-I', 'use lib' or 'PERL5LIB'... this is such a general topic that perldoc isn't much help.

Replies are listed 'Best First'.
Re: populating @INC
by Fastolfe (Vicar) on Oct 20, 2000 at 04:08 UTC
    The default value of @INC is set when Perl is compiled for your system and cannot be easily changed. Either set PERL5LIB in your /etc/profile (or some other global startup place), or recompile Perl to use your other locations.
Re: populating @INC
by mitd (Curate) on Oct 20, 2000 at 05:01 UTC

    In addition to Fastolfe's sage advice perl -V will detail all of your perl's compile-time info including whats included in @INC.

    Mitd -- Made in the Dark
    'grey appears to be my favourite colour'

RE: populating @INC
by extremely (Priest) on Oct 20, 2000 at 08:13 UTC
    To be a little more clear on this, the basic @INC list is compiled in to /usr/bin/perl or libperl.a or whatever. There isn't a file to edit as far as I know.

    As others mentioned, you need to recompile to remove items from the list and I know of no way to add them "globally" without doing the same.

    Actually, I've no idea how to knock one out at compile time either... I'm no help at all =(

    --
    $you = new YOU;
    honk() if $you->love(perl)