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

i have a mod_perl app that uses a custom set of libs (like any good mod_perl app should), but when i try to test compilation at the command line ( perl -c module ) compilation will (expectedly) fail because the libs aren't in the default @INC.

i think there's a way to alter @INC on the command line, but i can't remember it.

Replies are listed 'Best First'.
Re: perl -c and use lib
by Belgarion (Chaplain) on May 27, 2004 at 18:54 UTC

    perl -Idir will prepend dir to @INC. Is this what you're looking for?

Re: perl -c and use lib
by mifflin (Curate) on May 27, 2004 at 18:56 UTC
    perl -I/path/to/libs -c perlprog
    or
    set the env var PERL5LIB
Re: perl -c and use lib
by biosysadmin (Deacon) on May 27, 2004 at 19:29 UTC
    You can also set the $PERL5LIB environment variable if you like. Here's an example in bash:
    export PERL5LIB=/home/biosysadmin/perl_lib:/usr/local/perl_lib
    Hope this helps. :)
Re: perl -c and use lib
by PodMaster (Abbot) on May 27, 2004 at 23:14 UTC