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

Hello monks, Pingu here

I'm trying to tell my script where to find a module. I've got IIS setup properly, my script runs but cannot find module.pm as the directory its in is not in @INC.

I can't change the script to add 'use lib "c:/path/to/module";' because it's written by an external company...

Can I use the -I switch in the settings in IIS? THat is, the script config for perl in the management console says "c:\blah\perl\bin\perl.exe %s %s" at the moment, can I throw in the -I too to always add a certain directory to @INC, or is there an easier way??

Many thanks for your help,

Pingu

Replies are listed 'Best First'.
Re: Help using perl -I within IIS4.0
by particle (Vicar) on Mar 05, 2002 at 13:18 UTC
    you can add to the command-line using -I. you can also add to the environment (system or user) by using the PERL5LIB variable. look in perlrun under the ENVIRONMENT section for more info.

    ~Particle ;Þ

Re: Help using perl -I within IIS4.0
by gellyfish (Monsignor) on Mar 05, 2002 at 13:12 UTC

    You should be fine with adding '-Iwhatever' to the command line before the first %s

    /J\

Re: Help using perl -I within IIS4.0
by Pingu (Sexton) on Mar 06, 2002 at 11:39 UTC
    I tried using 'Iwhatever' to no avail - the browser wouldn't even load the script. No error msg, nowt. Is it to do with the fact I put it in double quotes as the filepath has spaces in?? Yes I know it's naughty to have spaces in your filepath but I didn't set up the machine.

    On the bright side we moved the whole lot from the test server to its production environment and it worked like a dream, without -I or anything else.

    Thanks again Monks for the speedy help.

    Pingu.