Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling

default install directory for modules

by niqola (Novice)
on Mar 07, 2013 at 11:15 UTC ( #1022202=perlquestion: print w/replies, xml ) Need Help??
niqola has asked for the wisdom of the Perl Monks concerning the following question:

Hi all,

I have some problem for installing a module from source. There are two users on the target machine (ubuntu) for the installation. Each user did same instructions as usual:

perl Makefile.PL make make test sudo make install

But for user1, the module is installed in /usr/local/share/perl/5.14.2 and for user2 in /home/user2/perl5/lib/perl5

I don't understand why?

Thank for your help.

Replies are listed 'Best First'.
Re: default install directory for modules
by tobyink (Abbot) on Mar 07, 2013 at 11:23 UTC

    Are they using the same copy of Perl itself? Run:

    which perl

    ... at the command line for each user.

    package Cow { use Moo; has name => (is => 'lazy', default => sub { 'Mooington' }) } say Cow->new->name
      Hi tobyink,

      Yes, both gives /usr/bin/perl

Re: default install directory for modules ( ExtUtils::MakeMaker )
by Anonymous Monk on Mar 07, 2013 at 11:40 UTC

    I don't understand why?

    If you look inside Makefile.PL you will see it uses, ExtUtils::MakeMaker

    ExtUtils::MakeMaker lists many options like INSTALL_BASE ... which can be specified in different ways

    RTFM to the rescue again

      Hi, Anonymous Monk,

      Yes, i know it.

      But, in this case no INSTALL_BASE option is specified for both users. So, i'm looking for where the default value is configured and i can't find.

        The answer was in the link. Do

        perl "-V:install.*"

        As each user. One of the users probably has a .cpan directory with a


        Yes, i know it...

        :) no you don't, click the link and read it

      Is it possible that from cpan configuration?

      In this case, how to change it?

      Thanks again.

        Yeah, read the link, I posted it for you
Re: default install directory for modules
by vinoth.ree (Monsignor) on Mar 07, 2013 at 12:00 UTC

    I guess the user2 could have used the perl Makefile.PL PREFIX="path"

    Install the same module using the cpan command and check where it is installing?

      The user2 has environment variables PERL_MM_OPT defined in his bash config file.

      Thank you very mush for all your helps!

        Did you use perl -V to figure that out?

        $ perl -V |tail -n8 |head -n3 %ENV: PERL_MB_OPT=" --config installhtmldir= --binhtml= " PERL_MM_OPT="shamalamadingdong"

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://1022202]
Approved by vinoth.ree
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (7)
As of 2017-11-23 10:03 GMT
Find Nodes?
    Voting Booth?
    In order to be able to say "I know Perl", you must have:

    Results (333 votes). Check out past polls.