in reply to perl installation fails @ ../lib/Module/Build/t/tilde.t

This happened to me when I was installing a module from CPAN using sudo cpan.

I worked round it by saying

sudo su # cpan
and doing the installation as root. It seemed to me that the test suite was picking up the pre-su UID and using that to generate its expected result but then receiving a different result because it was actually running under a different effective UID.
This signature will be ready by Christmas