Hi,
I am trying to set up Moose and to this end used perlbrew to install perl-5.20.3 to a users directory /home/grunt103 and then used perlbrews cpanm to install Moose and all it's dependencies. When the install started I was told "Can't write to /usr/local/share/perl5 and /usr/local/bin: Installing modules to /home/grunt103/perl5". The last on screen message was "Succesfully installed Moose-2.1804"
I have set up a test script with the lines;
use lib qw(/home/grunt103/perl5)
use Moose;
But when I run the script I get the message "Can't locate Moose.pm in @INC" even though it shows the /home/grunt103/perl5 path in @INC
I have searched for a Moose.pm module and found it in three different places;
/home/grunt103/.cpanm/work/1466508369.14292/Moose-2.1804/blib/lib/Moose.pm
/home/grunt103/.cpanm/work/1466508369.14292/Moose-2.1804/lib/Moose.pm
/home/grunt103/perl5/lib/perl5/x86_64-linux-thread-multi/Moose.pm
It is possible that this last location was created by an earlier attempt to install Moose using RPM
If I add /home/grunt103/.cpanm/work/1466508369.14292/Moose-2.1804/lib/ to the 'use lib' path then I no longer get the "Can't locate Moose.pm" but get a variety of messages about not locating the dependencies. When I search to see where .pm modules are installed below the /home/grunt103 directory I find I have more than 400 different unique paths to the modules!
About half are in directories below /home/grunt103/.cpanm/work/1466508369.14292
E.g. /home/grunt103/.cpanm/work/1466439552.5133/Dist-CheckConflicts-0.11/t/lib/basic/
E.g. /home/grunt103/.cpanm/work/1466439552.5133/Module-Runtime-0.014/lib/
Most of the others are in directories below /home/grunt103/perl5/perlbrew/build/perl-5.20.3 though a few are slightly higher up than this location
E.g. /home/grunt103/perl5/perlbrew/build/perl-5.20.3/cpan/ExtUtils-MakeMaker/lib/
E.g. /home/grunt103/perl5/perlbrew/build/perl-5.20.3/cpan/Module-Build/lib/
E.g. /home/grunt103/perl5/lib/perl5
How can I rationalise this into a practical form? Or do I need a code solution to create a single access point?
Thanks for your help
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.