Click here to get back home

Perl's @INC - am I missing the point?

 HomeNewsGroups | Search | About
 comp.lang.perl.misc    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
Perl's @INC - am I missing the point? Andrew Fabbro 04-17-2008
Posted by Andrew Fabbro on April 17, 2008, 12:02 am
Please log in for more thread options
When building (compiling) perl, I wanted to include a directory where
we install our local modules. So I built perl with -Dotherlibdirs=/app/
common/oracle/perl/local.

Later, I installed various modules with PREFIX=/app/common/oracle/perl/
local

However, perl can't find them (and yes, I checked and /app/common/
oracle/perl/local is in @INC). However, if I put this in @INC:

/app/common/oracle/perl/local/lib/site_perl/5.8.8/PA-RISC2.0-LP64

Then it finds things and works just fine.

But what the...heck is the point of -Dotherlibdirs if what you point
it at doesn't work!? So should I rebuild perl with -Dotherlibdirs set
to "/app/common/oracle/perl/local/lib/site_perl/5.8.8/PA-RISC2.0-
LP64"? The whole point of this exercise was to avoid having to
manually "use lib"...

Or perhaps I'm just confused...


Posted by xhoster on April 17, 2008, 12:55 am
Please log in for more thread options
> When building (compiling) perl, I wanted to include a directory where
> we install our local modules. So I built perl with -Dotherlibdirs=/app/
> common/oracle/perl/local.
>
> Later, I installed various modules with
> PREFIX=/app/common/oracle/perl/local


For some reason, PREFIX automatically gets /lib added to the end before it
gets used for the location of installing the modules. I'm sure this makes
complete sense to those people who understand this stuff, but I am not one
of them.


>
> However, perl can't find them (and yes, I checked and /app/common/
> oracle/perl/local is in @INC). However, if I put this in @INC:
>
> /app/common/oracle/perl/local/lib/site_perl/5.8.8/PA-RISC2.0-LP64
>
> Then it finds things and works just fine.

It would probably work fine if you just put in
/app/common/oracle/perl/local/lib


>
> But what the...heck is the point of -Dotherlibdirs if what you point
> it at doesn't work!? So should I rebuild perl with -Dotherlibdirs set
> to "/app/common/oracle/perl/local/lib/site_perl/5.8.8/PA-RISC2.0-
> LP64"? The whole point of this exercise was to avoid having to
> manually "use lib"...

I think you should rebuild with -Dotherlibdirs set to
/app/common/oracle/perl/local/lib

>
> Or perhaps I'm just confused...

You and I both.

Xho

--
-------------------- http://NewsReader.Com/ --------------------
The costs of publication of this article were defrayed in part by the
payment of page charges. This article must therefore be hereby marked
advertisement in accordance with 18 U.S.C. Section 1734 solely to indicate
this fact.

Posted by Andrew Fabbro on April 17, 2008, 4:03 am
Please log in for more thread options
On Apr 16, 9:55 pm, xhos...@gmail.com wrote:
> It would probably work fine if you just put in
> /app/common/oracle/perl/local/lib

Alas...nope.

Posted by Ben Morrow on April 17, 2008, 8:14 am
Please log in for more thread options

> When building (compiling) perl, I wanted to include a directory where
> we install our local modules. So I built perl with -Dotherlibdirs=/app/
> common/oracle/perl/local.
>
> Later, I installed various modules with PREFIX=/app/common/oracle/perl/
> local
>
> However, perl can't find them (and yes, I checked and /app/common/
> oracle/perl/local is in @INC). However, if I put this in @INC:
>
> /app/common/oracle/perl/local/lib/site_perl/5.8.8/PA-RISC2.0-LP64
>
> Then it finds things and works just fine.

You need to use LIB= for MakeMaker rather than PREFIX=. PREFIX is a
little weird (for historical reasons); it means 'this is where my whole
perl tree is installed', so it will attempt to create a whole lib/ man/
bin/ tree matching the one your perl is installed into, including
site_perl and so on.

Ben


Posted by Ben Morrow on April 17, 2008, 8:47 am
Please log in for more thread options

>
> > When building (compiling) perl, I wanted to include a directory where
> > we install our local modules. So I built perl with -Dotherlibdirs=/app/
> > common/oracle/perl/local.
> >
> > Later, I installed various modules with PREFIX=/app/common/oracle/perl/
> > local
> >
> > However, perl can't find them (and yes, I checked and /app/common/
> > oracle/perl/local is in @INC). However, if I put this in @INC:
> >
> > /app/common/oracle/perl/local/lib/site_perl/5.8.8/PA-RISC2.0-LP64
> >
> > Then it finds things and works just fine.
>
> You need to use LIB= for MakeMaker rather than PREFIX=. PREFIX is a
> little weird (for historical reasons); it means 'this is where my whole
> perl tree is installed', so it will attempt to create a whole lib/ man/
> bin/ tree matching the one your perl is installed into, including
> site_perl and so on.

Also, note that perl will only search arch-specific subdirs of
otherlibdirs if they existed when Configure was run. So you need to make
sure /app/common/oracle/perl/local/PA-RISC2.0-LP64 exists before you run
Configure.

Ben


Similar ThreadsPosted
adding floating point January 26, 2007, 9:25 pm
How to print at certain point in perl July 19, 2006, 12:08 pm
At what (if any) point does InsideOut become OO-overkill? December 5, 2006, 2:41 pm
What's the point of these lines of code? May 22, 2007, 9:13 pm
Reg- Floating point variables November 12, 2007, 9:13 am
Starting Point for backup script January 28, 2005, 3:16 am
a problem about function returning point April 29, 2007, 10:00 am
perl floating point problem November 8, 2007, 10:09 am
How can I change a Perl floating-point value to a bit vector? October 28, 2004, 7:29 pm
Can Perl be made to use IEEE floating=-point exception handling? August 22, 2005, 11:53 am

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap