Question

I am a newbie in Perl.
Needed help to find out why perl is loading libraries from a particular location(@INC).
Executing the following gives me:

$ perl -V
Summary of my perl5 (revision 5 version 10 subversion 1) configuration:

  Platform:
    osname=linux, osvers=2.6.9-68.9.elsmp, archname=x86_64-linux
    uname='linux xxxxxx01 2.6.9-68.9.elsmp #1 smp tue jan 29 09:49:28 est 2008 x86_64 x86_64 x86_64 gnulinux '
    **config_args='-de -Dprefix=/home/..../perl_5.10.1'**
    hint=recommended, useposix=true, d_sigaction=define
    useithreads=undef, usemultiplicity=undef
    useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef
    use64bitint=define, use64bitall=define, uselongdouble=undef
    usemymalloc=n, bincompat5005=undef

When and how exactly was the config_args specified.
Was it during the perl installation on this host?
Appreciate teh help.

Was it helpful?

Solution

It was set when your perl was configured - that is, before the perl executable was even compiled. This default @INC path has been compiled into your copy of perl; unless you recompile perl, it will always be part of your perl's default @INC.

It is still possible for you to alter @INC at run time. It's just a plain old array, what you can manipulate with standard array operations like shift, push, pop, splice, etc.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top