I have run into the exact same problem on the script server I set up for my alliance on Lacuna Expanse.

I've found that editing the metadata files for the perlbrew installation in the new user's home directory (and the new user's .bashrc/.bash_profile) is the way to correct the path problem. It really was quite simple, even though it wasn't automated.

For an automated solution, a quick search/replace script could be created to do the path corrections for you in the appropriate files.

One final point of advice: Look in the ~/.cpanm / ~/.perlbrew/ directories for any conf files that need updating as well. As the new user, run the cpanm command on a simple module to make sure you got it right.

Good luck!

Tommy
A mistake can be valuable or costly, depending on how faithfully you pursue correction

In reply to Re: How to provide an isolated Perl environment for newly added users? by Tommy
in thread How to provide an isolated Perl environment for newly added users? by walkingthecow

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • 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:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.