in reply to
Configuring CPAN out of script does not work
I asked a similar question about a year and a half ago over at
Automating CPAN Configuration
. Not exactly the same thing, but some of the answers I got may apply to your situation.
Comment on
Re: Configuring CPAN out of script does not work
In Section
Seekers of Perl Wisdom