The cpanm installed by the command you found is a good solution. Essentially the problem you had is that when you install (properly distributed) executable files from CPAN, such as cpanm, its shebang is rewritten so that it executes with the Perl it was installed to. This is important, because only the Perl it is installed to is guaranteed to have its prerequisites installed at that point, among other things. It turns out this isn't very important for cpanm though as it's pure-Perl and has no non-core dependencies, so you can instead just download the fatpacked version from https://cpanmin.us and run it with any Perl you like, to install things to that Perl:
wget -qO /path/to/cpanm.pl https://cpanmin.us; /path/to/perl /path/to/cpanm.pl $args The install-cpanm command uses a similar method. My strategy is to grab this fatpacked cpanm, and use it to install App::cpanminus to each Perl I work with.
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.