Thank you kcott and tobyinky for the replies.

My purpose is to install a self-contained perl and a collection of modules all together.
Such that I can have my scripts work seamlessly by just pointing the shebang to the perl bin.
E.g.  $PERLBREW_ROOT/perls/perl-5.32.0/bin/perl in this case.

As I mentioned in my post I installed the modules by doing
cd $PERLBREW_ROOT/perls/perl-5.32.0 cpanm -L . MODULE
The cpanm is localed at $PERLBREW_ROOT/bin/cpanm
This has resulted in the following tree (truncated):
perls \-- perl-5.32.0/ |-- bin/ | |-- cpan* | |-- perl* | |-- perl5.32.0* | \-- zipdetails* \-- lib/ |-- 5.32.0/ | |-- AnyDBM_File.pm | |-- App/ | |-- x86_64-linux-thread-multi-ld/ | \-- XSLoader.pm |-- perl5/ | |-- Alien/ | |-- alienfile.pm | |-- x86_64-linux-thread-multi-ld/ | \-- XML/ \-- site_perl/ \-- 5.32.0/
As you can see it has created the perl5/ folder I mention.

Could you please suggest the correct way to install modules in this perl lib such that the module files sit in the given lib/5.32.0 or lib/site_perl area?

Thank you again!

In reply to Re^3: Why is lib/perl5 not added to INC for perls installed using perlbrew by areldy_exten
in thread Why is lib/perl5 not added to INC for perls installed using perlbrew by areldy_exten

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.