While running the Cygwin updater, I allowed it to upgrade my version of perl from 5.30 to 5.32. Now when I try to run perl scripts, I receive errors related to module locations. Here is a sample program:
#!/usr/bin/perl -w use strict; use WWW::Mechanize; printf("foo\n");
Here is the output:
Can't locate WWW/Mechanize.pm in @INC (you may need to install the WWW +::Mechanize module) (@INC contains: /home/Special_K/perl_modules /usr +/local/lib/perl5/site_perl/5.32/x86_64-cygwin-threads /usr/local/shar +e/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) at ./test.pl line 3. BEGIN failed--compilation aborted at ./test.pl line 3.
After searching for help I modified my code to the following:
#!/usr/bin/perl5.30.3 -w use strict; use WWW::Mechanize; printf("foo\n");
Now the output is as follows:
Can't locate strict.pm in @INC (you may need to install the strict mod +ule) (@INC contains: /home/Special_K/perl_modules /usr/local/lib/perl +5/site_perl/5.30/x86_64-cygwin-threads /usr/local/share/perl5/site_pe +rl/5.30 /usr/lib/perl5/vendor_perl/5.30/x86_64-cygwin-threads /usr/sh +are/perl5/vendor_perl/5.30 /usr/lib/perl5/5.30/x86_64-cygwin-threads +/usr/share/perl5/5.30) at ./test.pl line 2. BEGIN failed--compilation aborted at ./test.pl line 2.
I'm not sure how to fix this. How do I locate strict.pm?
Also here are some related questions:
1. 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?
2. If I install a new version of perl but I want some scripts to use the prior version of perl, 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?
In reply to help fixing module paths after upgrading perl in cygwin by Special_K
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |