http://www.perlmonks.org?node_id=1154754


in reply to Cant find modules after upgrade

The problem is that cpan will still be using whatever version of perl that you installed it with. You can check which version it's trying to install modules for by calling cpan --version.

You'll get a message like:
$ cpan --version /usr/bin/cpan version 1.61 calling Getopt::Std::getopts (version 1.07 +[paranoid]), running under Perl version 5.18.2. [Now continuing due to backward compatibility and excessive paranoia +. See 'perldoc Getopt::Std' about $Getopt::Std::STANDARD_HELP_VERSION +.]

To make sure that you're calling the CPAN shell with a specific version, you should call it using the specific version of perl, rather than the 'cpan' script: /path/to/perl -MCPAN -e shell.

Also note that you can run into the same problem with cpanm.

Replies are listed 'Best First'.
Re^2: Cant find modules after upgrade
by cbtshare (Monk) on Feb 10, 2016 at 19:00 UTC
    thank you using the cpan from the new location worked.