Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister

Re^2: What are the "prefix" and "lib" arguments to used for?

by tinita (Parson)
on Jul 31, 2006 at 09:56 UTC ( #564726=note: print w/replies, xml ) Need Help??

in reply to Re: What are the "prefix" and "lib" arguments to used for?
in thread What are the "prefix" and "lib" arguments to used for?

actually, this documentation has never helped me. i just didn't get the difference of the two parameters.

a couple of years ago, when I had the problem to install an application onto the customers machine and the dependant modules (packaged with the application) into a certain directory nobody in c.l.p.m could really help me, and the MakeMaker docs didn't either. I only used the PREFIX parameter and was wondering how to predict in which directories the modules would end up (as this changed also between perl versions).

I happened to stumble over a website where Makefile.PL was called additionally with the LIB parameter (I don't remember where I found this). I tried it, and it just worked. Foo::Bar ended up reliably in prefix/Foo/, so that I knew that I could just say use lib qw(prefix);

But why?

So I think the docs are not really easy to understand. It says for PREFIX=~:
This will install all files in the module under your home directory, with man pages and libraries going into an appropriate place (usually ~/man and ~/lib).

and for LIB=~/lib:
This will install the module's architecture-independent files into ~/lib, the architecture-dependent files into ~/lib/$archname.

What exactly is the difference between "all files in the module" and "the module's architecture-independent files"? (Note that also using PREFIX will use a different directory for architecture dependant files.) If you read the documentation for LIB, you don't know why you still have to use PREFIX.

I think a part of the confusion is caused by the fact that both parameters can contradict each other (saying PREFIX=/foo/bar LIB=/foo/baz)

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://564726]
[marto]: yep :)
[Discipulus]: being her marto, can you explain what "Par for the course I'm afraid." means?
Discipulus here..
[marto]: "what is normal or expected in any given circumstances."
[marto]: better: "If a type of behaviour, event, or situation is par for the course, it is not good but it is normal or as you would expect"
[Discipulus]: thanks i was unable to decide where to split the sentece
[marto]: FWIW search.cpan rarely has issues, see http://noc.perl. org for a route to report problems
[oakbox]: thanks, marto.
[marto]: there was a period where search.cpan had some frequent outages for (IIRC) a couple of weeks. I've not had any problems since, until today.
[marto]: this was about 16 months ago maybe. the noc team are, in my experience, very responsive to reports of issues, so please raise the issue after checking known problems/outages

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (5)
As of 2017-07-26 10:14 GMT
Find Nodes?
    Voting Booth?
    I came, I saw, I ...

    Results (388 votes). Check out past polls.