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

This is not a mission critical sort of question, more of a curiosity, so I apologize if it's in the wrong section of the site.

Being a mere mortal and not root, I can't get away with just saying "perl MakeFile.PL" when installing modules. Because the tutorial by Tachyon says to append "LIB=/your/lib", that's what I've been doing, being a loyal perlmonks.org fan :). On other sites, I've seen "PREFIX=/your/lib" as the append. So, I'm wondering what the difference is. Is this another example of kind-of similar functionality with some critical differences, as in use module versus require module?

Thanks,

clairudjinn

Replies are listed 'Best First'.
Re: PREFIX= vs LIB=
by Zaxo (Archbishop) on Feb 05, 2003 at 20:33 UTC

    ExtUtils::MakeMaker's pod has a section titled 'PREFIX and LIB attribute'. It gives the exact effects of each and tells how conflicts between them are resolved.

    After Compline,
    Zaxo

      From this pod:

      perl Makefile.PL 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).

      Unfortunately old versions of ExtUtils::MakeMaker are broken (those which are included in Perl <= 5.6.1) and value of PREFIX is not used when installing Perl modules and man pages. This is why all old tutorials on this topic recomend using LIB. Good news are that updated ExtUtils::MakeMaker is avialable from CPAN so you can upgrade it if you are stick with old versions of Perl.

      --
      Ilya Martynov, ilya@iponweb.net
      CTO IPonWEB (UK) Ltd
      Quality Perl Programming and Unix Support UK managed @ offshore prices - http://www.iponweb.net
      Personal website - http://martynov.org