I prefer to run CPAN.pm as a normal user and have it use sudo just for the actual installation, rather than running tests etc as root.
I have an annoying habit of forgetting the option names , so I’m posting this here for my reference, but might be useful for other people too.
To do that, do the following from a CPAN shell:
o conf make_install_make_command 'sudo make'
o conf mbuild_install_build_command 'sudo ./Build'
o conf commit
Also, whilst documenting that, to set your preferred CPAN mirror:
o conf urllist unshift ftp://mirrors.uk2.net/pub/CPAN/
o conf commit