I see that you have multiple versions of perl installed via Cygwin. When a new perl version is installed via Cygwin, are older versions' modules uninstalled, as haukex suggested above? Based on your post, it seems like that is not the case.



I attempted to replicate what you're showing us, but couldn't. However, although you've shown the code and the output, you don't say how you ran it: ./script.pl; perl script.pl; /usr/bin/perl script.pl; /usr/bin/perl5.30.3 script.pl; etc.

I called it by using./test.pl


Try running variations of the following to see what's in @INC and where your modules are located (from %INC info):

If I run it using perl5.32.1, I receive the following output:



> /usr/bin/perl5.32.1.exe -E 'use strict; use warnings; say for @INC; +use Data::Dumper; print Dumper \%INC;' /home/Special_K/perl_modules /usr/local/lib/perl5/site_perl/5.32/x86_64-cygwin-threads /usr/local/share/perl5/site_perl/5.32 /usr/lib/perl5/vendor_perl/5.32/x86_64-cygwin-threads /usr/share/perl5/vendor_perl/5.32 /usr/lib/perl5/5.32/x86_64-cygwin-threads /usr/share/perl5/5.32 $VAR1 = { 'feature.pm' => '/usr/share/perl5/5.32/feature.pm', 'Data/Dumper.pm' => '/usr/lib/perl5/5.32/x86_64-cygwin-threa +ds/Data/Dumper.pm', 'overloading.pm' => '/usr/share/perl5/5.32/overloading.pm', 'strict.pm' => '/usr/share/perl5/5.32/strict.pm', 'warnings.pm' => '/usr/share/perl5/5.32/warnings.pm', 'warnings/register.pm' => '/usr/share/perl5/5.32/warnings/re +gister.pm', 'bytes.pm' => '/usr/share/perl5/5.32/bytes.pm', 'Exporter.pm' => '/usr/share/perl5/5.32/Exporter.pm', 'constant.pm' => '/usr/share/perl5/5.32/constant.pm', 'XSLoader.pm' => '/usr/share/perl5/5.32/XSLoader.pm', 'Carp.pm' => '/usr/share/perl5/5.32/Carp.pm' };


If however I try to run that command using perl5.30.3.exe, I receive the following error:



> /usr/bin/perl5.30.3.exe -E 'use strict; use warnings; say for @INC; +use Data::Dumper; print Dumper \%INC;' Can't locate feature.pm in @INC (you may need to install the feature m +odule) (@INC contains: /home/Special_K/perl_modules /usr/local/lib/pe +rl5/site_perl/5.30/x86_64-cygwin-threads /usr/local/share/perl5/site_ +perl/5.30 /usr/lib/perl5/vendor_perl/5.30/x86_64-cygwin-threads /usr/ +share/perl5/vendor_perl/5.30 /usr/lib/perl5/5.30/x86_64-cygwin-thread +s /usr/share/perl5/5.30).


Did my perl5.30.3.exe modules really get uninstalled when I installed 5.32? For some reason, /usr/share/perl5/5.30 is empty except for a CPAN directory, but /usr/share/perl5/5.32 appears to have all of the built-in modules. If you go to the /usr/share/perl5/<version>/ directories, does each one have a separate copy of each built-in module?

In reply to Re^2: help fixing module paths after upgrading perl in cygwin by Special_K
in thread help fixing module paths after upgrading perl in cygwin by Special_K

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.