I'm not sure how to fix this. How do I locate strict.pm?

I don't have a copy of Cygwin at the moment, but since you also wrote that you upgraded your Perl version, I suspect that it actually deinstalled Perl 5.30, while for some reason leaving /usr/bin/perl5.30.3 behind. That would explain a core module like strict.pm missing.

If I install a new version of perl, do I need to install new copies of every module that was installed for the prior version of perl I was using?

Yes. Some modules may survive being used in the new version of Perl, but any XS modules won't. That's why it's generally not recommended to reinstall all modules. Note you may want to look at e.g. cpanfiles to document your required modules, as they make it easy to install them all in one go using cpanm.

If I install a new version of perl but I want some scripts to use the prior version of perl

Why would you want to do this? I don't think there were any major incompatibilities between 5.30 and 5.32, so you should be fine using the latter.

... do I need to manually edit each of those scripts to point to the old version, as I have done in my second sample code block above?

Not necessarily, for example I use the shebang #!/usr/bin/env perl to use whatever perl is first in PATH, and for example tools like perlbrew make it easy to modify PATH to point to whatever version of Perl you want.

However, in this case it would appear to me that your best course of action would be to install WWW::Mechanize to your Perl 5.32.

Update: Fixed second paragraph (was originally "not recommended to reuse modules across versions" and I forgot to remove the "not" when changing it, sorry).


In reply to Re: help fixing module paths after upgrading perl in cygwin (updated) by haukex
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.