Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: What are the "prefix" and "lib" arguments to makefile.pl used for?

by jhourcle (Prior)
on Jul 31, 2006 at 13:42 UTC ( #564741=note: print w/ replies, xml ) Need Help??


in reply to What are the "prefix" and "lib" arguments to makefile.pl used for?

LIB is the directory that the system should install the modules to... PREFIX is um ... special.

Basically, to summarize the slides -- PREFIX is used to affect LIB, PATH, and MANPATH ... but because some vendors have adjusted how those values are derived from PREFIX, you can end up with files where you didn't expect them

(oh ... and Module::Build now supports PREFIX, but I'm not sure that's a good thing)


Comment on Re: What are the "prefix" and "lib" arguments to makefile.pl used for?
Re^2: What are the "prefix" and "lib" arguments to makefile.pl used for?
by tphyahoo (Vicar) on Jul 31, 2006 at 14:19 UTC
    I understand vaguely supporting PREFIX has become hairy. What I don't understand is, what are the best practices to deal with the situation.

    Is tinita's suggestion of using LIB and PREFIX together a best practice for installing modules locally?

    Will this ever fail?

    If yes, when will if fail?

    If no (ie, it shouldn't ever fail), shouldn't the documentation for installing perl modules locally be patched to mention this?

    More concretely: if there's a scenario like the one you mentioned, where LIB is calculated from PREFIX, but the PREFIX value was also specified to Makefile.PL, which value will ultimately wind up being used?

      If you pass both, PREFIX will be used to generate PATH and MANPATH, while the LIB you passed in will be used as is.

      And I'm relucant to say 'best practice', as what's best in each situation varies greatly. Specifying both should get the .pm files installed to the correct place, but I can't be sure that your man pages or executables will be.

      And to respond to your other question --

      'vendor' == Vendors of operating systems that supply already compiled versions of perl.

      As for examples, the link I gave (which was labeled 'special', and could have been labeled better), is a talk by Michael Schwern titled 'Why PREFIX Will Never Work'. Slide 8 talks about Apple's values in MacOSX, and slide 9 talks about the values in Debian.

Re^2: What are the "prefix" and "lib" arguments to makefile.pl used for?
by tphyahoo (Vicar) on Jul 31, 2006 at 14:29 UTC
    "...because some vendors have adjusted how those values are derived from PREFIX..."

    I'm confused.

    Some vendors of what? Perl? Perl modules? Operating systems?

    Do you know of any specific examples of this?

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://564741]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (6)
As of 2014-09-02 00:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite cookbook is:










    Results (18 votes), past polls