Doesn\'t work with other modules, but to give an example. I installed Text::CSV_XS with a CPAN setting:
\'makepl_arg\' => q[PREFIX=~/lib],
Try this instead:
'makepl_arg' => q[PREFIX=~/]
PREFIX sets the base for all the directories you will be installing into (bin, lib, and so forth.)
You may also be running into shell expansion problems with your '~'. You can try to expand it yourself:
'makepl_arg' => q[PREFIX=/home/users/foobar]
It would also be helpful if you included the commands you used to get the error you are asking about.