Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"

Re: Compiling Perl with correct values in @INC

by Courage (Parson)
on Aug 15, 2002 at 20:14 UTC ( #190514=note: print w/replies, xml ) Need Help??

in reply to Compiling Perl with correct values in @INC

  1. perl built on different OSes has different logic for @INC population.
  2. Your script will work just fine if you'll place at the very start of it:
    BEGIN { @INC = ('/dir1','/your/special/dir/here'); } # rest of your code goes here
    I use that approach sometimes in my scripts.
  3. recompiling perl is much easier that it initially seemes to. And lot of platform-specific READMEs help a lot.
addition: BTW what is your OS?

Courage, the Cowardly Dog
things, I do for love to perl...

Replies are listed 'Best First'.
Re: Re: Compiling Perl with correct values in @INC
by higle (Chaplain) on Aug 15, 2002 at 21:12 UTC
    The machine in question is running HP-UX, and I found one (1) document specific to building perl on that OS :c\

    The problem was, Courage, without rebuilding the executable with the correct @INC, I would have to unshift(@INC, qw{dir dir dir...}); all the scripts that I wrote on that machine, as well as look forward to explaining this whole thing to the other programmers who use that box. That would truly have been a bummer of cosmic proportions.

      Things are entirely different if you're building perl for many users on that machine.

      I just looked at perl-5.8.0 source distribution, and found README.HPUX file there - it should help you in build process...

      Courage, the Cowardly Dog

Re: Re: Compiling Perl with correct values in @INC
by mcavoy76 (Acolyte) on Aug 15, 2002 at 21:25 UTC
    This also works great if your hosting company doesn't want to install a particular module.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://190514]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (8)
As of 2018-06-21 23:04 GMT
Find Nodes?
    Voting Booth?
    Should cpanminus be part of the standard Perl release?

    Results (120 votes). Check out past polls.