Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw

duplicate modules any concern?

by compused (Acolyte)
on Feb 18, 2012 at 02:44 UTC ( #954682=perlquestion: print w/replies, xml ) Need Help??
compused has asked for the wisdom of the Perl Monks concerning the following question:

After changing the cpan makepl_arg setting I tried downloading YAML again, as an experiment. Not to my total surprise, its appeared in a second location (consistent with the makepl_arg setting). So which YAML does perl use?
Can you or should you configure the library path manually? I ask this bec. neither of these locations correspond to where the bulk of the modules were installed, from the original installation*

YAML first installed, as expected, in:


and after changing the makepl_org setting, YAML appeared in:


*but modules from the original install are in:



Replies are listed 'Best First'.
Re: duplicate modules any concern?
by Anonymous Monk on Feb 18, 2012 at 02:55 UTC

    So which YAML does perl use?

    The first one in @INC  perl -MYAML -le " print $INC{q/} "

    Can you or should you configure the library path manually?

    Sure, if you want. perlrun#PERL5OPT


Re: duplicate modules any concern?
by JavaFan (Canon) on Feb 18, 2012 at 10:58 UTC
    So which YAML does perl use?
    If you ask Perl nicely, it will tell you:
    perl -MYAML -E 'say $INC{""} # Please'
      [~] # perl -MYAML -E 'say $INC{""} # Please' /opt/lib/perl5/site_/5.14.2/ # you're welcome!

      To be honest, I am confused about library path settings
      During perl install I was asked this question and entered config as shown below:

      1. Pathname where the private library files will reside? (~name ok) [/opt/lib/perl5/5.14.2]

      -->so is this the same as the cpan <mbuildpl_arg> if not already set, when using CPAN should I set:

      cpan> o conf makepl_arg "PREFIX=/opt"

      2. Another question during the perl install was:

      Pathname for the site-specific library files? (~name ok) [/opt/lib/perl5/site_/5.14.2]

      --> does this relate to any of the 'o conf' settings?

      3. Another question I have is...can you set such parameters as cpan's <cpan_home>, <build_dir>, <mbuildpl_arg> or <makepl_arg> during a tarball installation of perl?
      The problem is that I am installing it on a qnap NAS device in which /root is on a RAM drive with limited space. You can't accept the default settings. I was hoping to write the steps up on the qnap forum.

      4. A final question which arose from another posting here is, should I have set:

      cpan> o conf mbuildpl_arg "--install_base /opt"

      and how does this differ from

      cpan> o conf makepl_arg "PREFIX=/opt" )



        I do not know the answers to 1) and 2). For 3), the answer is no. Basically, for the same reason that you don't get to set your .exrc while compiling your Linux. Cpan is a tool, and it will allow configuration the first time it's run by a user. Different users get to pick different settings. For question 4), I'm unfamiliar with those settings, but judging from their spelling, one seems to be related to, the other to But this is just a guess, assuming the author(s) picked sensible names.
Re: duplicate modules any concern?
by Don Coyote (Pilgrim) on Feb 18, 2012 at 08:42 UTC

    Just a brief thought on this.

    You can. Whether you should, depends on whom the module is going to be used by. If you are satisfied you are the only one going to use the module then there's no concerns over how you adapt your own system to suit your needs. But, should the module have a higher destiny, you may need to consider using more transparent methods such as compile time directives.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://954682]
Approved by GrandFather
Front-paged by Corion
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (6)
As of 2018-05-23 16:02 GMT
Find Nodes?
    Voting Booth?