The first time you run cpan from the command line, you are prompted for answers to various questions. How do you automate cpan and install modules non-interactively from the
I was looking for an easy solution for this as well and found that this works:
(echo y;echo o conf prerequisites_policy follow;echo o conf commit)|cpan
Just thought I would post it here in case anyone else comes along.