Try setting PERL_MM_USE_DEFAULT like so:
PERL_MM_USE_DEFAULT=1 perl -MCPAN -e 'install My::Module'
It should make CPAN answer the default to all prompts.
Try setting PERL_MM_USE_DEFAULT like so:
PERL_MM_USE_DEFAULT=1 perl -MCPAN -e 'install My::Module'
It should make CPAN answer the default to all prompts.