This is due to a broken symlink.

Do:

rm -rf ~/.cpanm

The error is fixed.