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
After upgrading or if you have already upgraded and receive the above error complete the following steps from the CPAN shell.
1. Reload Index: reload index
2. Restart CPAN: reload cpan
3. Quit CPAN: quit
4. Start CPAN Again: perl -MCPAN -e shell
5. Attempt Install: install Class::Accessor
This time the install went without a hitch.