I've just installed v5.42.0 via Perlbrew using the commands shown under Quickstart:

To install the latest stable release ...

perlbrew install perl-5.42.0 perlbrew switch perl-5.42.0

I'm guessing your "perlbrew install stable" would achieve the same result.

I've also installed a number of modules, via the cpan utility, including namespace::clean. I repeated your commands:

ken@titan ~/tmp $ perl -E 'use namespace::clean' ken@titan ~/tmp $ perl -v This is perl 5, version 42, subversion 0 (v5.42.0) built for cygwin-th +read-multi Copyright 1987-2025, Larry Wall ...

So, there's nothing inherently wrong with the perl-5.42.0 from Perlbrew. I acknowledge that you're using Linux and I'm using Cygwin — for test commands as simple as the ones above, I don't believe this would make any difference.

It is a fairly common mistake to copy modules from one Perl version to another; for instance, I might have tried:

ken@titan ~/perl5/perlbrew/perls $ cp perl-5.40.0/lib/site_perl/5.40.0/namespace/clean.pm perl-5.42.0/l +ib/site_perl/5.42.0/namespace/clean.pm

Had I done so, I could have expected an error such as you're getting. I don't know if this is what you've done but your results are suggesting something like this has occurred. Here's some basic information:

I note ibm1620 suggested clone-modules. I've never used that but it may suit your needs. See perlbrew: COMMAND: CLONE-MODULES for documentation.

Finally, please consider registering — see Create A New User. You won't be asked for your life story like some forums; we'll be able to tell you apart from other Anonymous Monks; and, you'll find quite a few benefits such as editing your posts, customising the GUI, and others.

— Ken


In reply to Re: how do you determine which module needs to be updated while using perlbrew? by kcott
in thread how do you determine which module needs to be updated while using perlbrew? by Anonymous Monk

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.