stevieb here, the person who took over and now maintains berrybrew (thanks for the mention, dasgar!).

At this time, there is no built-in way to manage external lib directories outside of each Perl instance, but it is on my roadmap (after I get my RasPi work completed).

Personally, I like each instance to have its own installation of modules, but I digress. It's been requested of me to build in the ability that you're asking for, and as I said, it's on the roadmap. For now, you can do what you're doing, or shift out @INC (unshift @INC, '/path/to/libs'). Some modules will break, others won't.

If you want an easy way to install a module on all Perl instances with berrybrew and avoid using a single lib dir:

berrybrew exec cpanm Module::Name

That'll install the module on all installed Perl instances. If you have a module to install but it won't work on some version, I've added in the ability to exec on certain versions only (NOTE: no space between the perl versions!):

berrybrew exec --with 5.24.0_64,5.10.1_32 cpanm Module::Name

If you have any problems or issues, or want to discuss options on how you'd like to see a lib option be implemented, feel free to open an issue on the berrybrew link above (my github), or message me here and I can send over my email address.

update: To boot, if you're working with Strawberry Perl portable editions, you can incorporate them into berrybrew by copying/moving the instance directory into c:\berrybrew directory, and ensure that it is named exactly the same as one of the entries in berrybrew available. Thereafter, you can clone it to whatever name you want. I did not get as far in the Perl registration logic to allow just dumping any old directory into the berrybrew dir and have it auto-register, but that feature isn't far off either./update


In reply to Re^3: Common module lib across Perl versions on same system by stevieb
in thread Common module lib across Perl versions on same system by VinsWorldcom

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.