Proxy must be specified as absolute URI

I encounter frequently a problem when installing Perl modules as follows:

perl -MCPAN -e 'install Family::Module'

The error message is:

Proxy must be specified as absolute URI; ' ' is not at /usr/local/lib/perl5/5.8.8/CPAN.pm line 2357

even though I am not behind a proxy. Forcing to install the module as such:

perl -MCPAN -e force 'install Family::Module'

does not lead to any message, but still leads to error messages when running the Perl program that depends on the module.
What can be done to resolve this?

You've got either the ftp_proxy or http_proxy setting for CPAN set to a single blank. Start the CPAN shell with

perl -MCPAN -eshell

and enter this

o conf ftp_proxy ''
o conf http_proxy ''

(That's two single quotes with nothing between them)

Thank you for your swift response. What can I do upon installation of CPAN and Perl to have these settings from the start? Which configuration file needs these settings?

---------- Post updated at 19:07 ---------- Previous update was at 19:06 ----------

Also, I still get the same error message:

# perl -MCPAN -e 'install XML::Simple'
CPAN: Storable loaded ok
Going to read /root/.cpan/Metadata
  Database was generated on Sat, 26 Sep 2009 00:27:06 GMT
Running install for module XML::Simple
Running make for G/GR/GRANTM/XML-Simple-2.18.tar.gz
CPAN: LWP::UserAgent loaded ok
Proxy must be specified as absolute URI; ' ' is not at /usr/local/lib/perl5/5.8.8/CPAN.pm line 2357

If you've verified that the settings work, you can save it by entering

o conf commit

in the CPAN shell.

CPAN settings are kept in /usr/local/lib/perl5/5.8.8/CPAN/Config.pm (global) or ~/.cpan/CPAN/MyConfig.pm (user-specific)

Thank you for your response. So the following from the Config.pm file is correct and is equivalent to your entries that one can do within CPAN?

'ftp_proxy' => q[ ],
'http_proxy' => q[],