G'day areldy_exten,

Welcome to the Monastery.

I also have Perl 5.32.0 installed using Perlbrew. From the description of your setup, mine seems to be identical; of course, mine may differ from yours in areas that you haven't mentioned.

$ perlbrew list * perl-5.32.0 perl-5.30.0 $ which perl /home/ken/perl5/perlbrew/perls/perl-5.32.0/bin/perl $ echo $PERLBREW_ROOT /home/ken/perl5/perlbrew $ $PERLBREW_ROOT/perls/perl-5.32.0/bin/perl -V Summary of my perl5 (revision 5 version 32 subversion 0) configuration +: ... @INC: /home/ken/perl5/perlbrew/perls/perl-5.32.0/lib/site_perl/5.32.0/cy +gwin-thread-multi /home/ken/perl5/perlbrew/perls/perl-5.32.0/lib/site_perl/5.32.0 /home/ken/perl5/perlbrew/perls/perl-5.32.0/lib/5.32.0/cygwin-threa +d-multi /home/ken/perl5/perlbrew/perls/perl-5.32.0/lib/5.32.0 $ ls -l $PERLBREW_ROOT/perls/perl-5.32.0/lib/perl5 ls: cannot access '/home/ken/perl5/perlbrew/perls/perl-5.32.0/lib/perl +5': No such file or directory
"Why isn't this included automatically in the @INC?"

Short answer: because it doesn't exist.

Longer answer. I've been using Perlbrew for a very long time, certainly more than a decade, and I don't recall $PERLBREW_ROOT/perls/<install-name>/lib/perl5 ever being a standard Perlbrew directory. This would be why such a path would not be automatically added to @INC.

I'm not a user of cpanm, I use cpan. As such, I'm not in any position to comment on your use of cpanm beyond suggesting that you check that you are using it correctly. I know cpanm is widely used: if you have questions about that, you can definitely get help about it here.

If you have modules installed in non-standard locations, consider using PERL5LIB (see "perlrun: ENVIRONMENT") or use the lib pragma. There are other ways of dealing with this but that's probably jumping the gun and heading off-topic for the current issue.

Minor in-joke for anyone who recalls "Re^4: [OT] 'perl' is not the 'perl' reported by 'which perl'": yes, I did remember type but thought which was more appropriate here. However, just for completeness:

$ type perl perl is /home/ken/perl5/perlbrew/perls/perl-5.32.0/bin/perl

— Ken


In reply to Re: Why is lib/perl5 not added to INC for perls installed using perlbrew by kcott
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.