First let me say I am not very familiar with Perl or with CPAN so this is to hopefully help out anyone else in my shoes. I received the below type of error during various attempts at installing items from the CPAN shell. I will provide a couple examples of the errors as well as how I figured out that in reality I already had the latest version installed for my version of Perl, which is Perl 5.8.8, and the error was really saying there is a new version but Perl 5.10.0 is required.
Can’t use string (“CPAN::Tarzip”) as a HASH ref while “strict refs” in use at /usr/lib/perl5/5.8.8/CPAN/Tarzip.pm line 94.
The below error message was received after starting the CPAN shell and running “install Class::Accessor”. It was after upgrading the CPAN.pm message so to resolve this issue either just reload or upgrade and reload. Both sets of steps are detailed below.
Error: Can’t use string (“CPAN::Tarzip”) as a HASH ref while “strict refs” in use at /usr/lib/perl5/5.8.8/CPAN/Tarzip.pm line 94.
If you have not upgraded complete the following from the CPAN shell.
1. Open CPAN: perl -MCPAN -e shell
2. Upgrade CPAN.pm: install Bundle::CPAN