cpan安装模块怎样设置代理?

cpan安装模块怎样设置代理?

服务器不通外网,准备使用代理,无需认证。
首次执行perl -MCPAN -e shell,回答一堆问题包括代理设置,进入cpan>,安装模块和列模块失败,提示取模块失败,检查服务器网络,无与代理服务器通讯。怎样使cpan安装启用代理?
第二次执行perl -MCPAN -e shell直接进入,怎样修改上一次设置参数?
谢谢。
删了你的~/.cpan 好像再执行的时候就会让你重新配置的吧
http://forums.cacti.net/post-49766.html

help
里面有conf吧。
详细说明请看:
http://search.cpan.org/~jhi/perl-5.8.0/lib/CPAN.pm

CONFIGURATION ^

When the CPAN module is installed, a site wide configuration file is created as CPAN/Config.pm. The default values defined there can be overridden in another configuration file: CPAN/MyConfig.pm. You can store this file in $HOME/.cpan/CPAN/MyConfig.pm if you want, because $HOME/.cpan is added to the search path of the CPAN module before the use() or require() statements.

Currently the following keys in the hash reference $CPAN::Config are defined:

  build_cache        size of cache for directories to build modules
  build_dir          locally accessible directory to build modules
  index_expire       after this many days refetch index files
  cache_metadata     use serializer to cache metadata
  cpan_home          local directory reserved for this package
  dontload_hash      anonymous hash: modules in the keys will not be
                     loaded by the CPAN::has_inst() routine
  gzip               location of external program gzip
  inactivity_timeout breaks interactive Makefile.PLs after this
                     many seconds inactivity. Set to 0 to never break.
  inhibit_startup_message
                     if true, does not print the startup message
  keep_source_where  directory in which to keep the source (if we do)
  make               location of external make program
  make_arg           arguments that should always be passed to 'make'
  make_install_arg   same as make_arg for 'make install'
  makepl_arg         arguments passed to 'perl Makefile.PL'
  pager              location of external program more (or any pager)
  prerequisites_policy
                     what to do if you are missing module prerequisites
                     ('follow' automatically, 'ask' me, or 'ignore')
  proxy_user         username for accessing an authenticating proxy
  proxy_pass         password for accessing an authenticating proxy
  scan_cache         controls scanning of cache ('atstart' or 'never')
  tar                location of external program tar
  term_is_latin      if true internal UTF-8 is translated to ISO-8859-1
                     (and nonsense for characters outside latin range)
  unzip              location of external program unzip
  urllist            arrayref to nearby CPAN sites (or equivalent locations)
  wait_list          arrayref to a wait server to try (See CPAN::WAIT)
  ftp_proxy,      }  the three usual variables for configuring
    http_proxy,   }  proxy requests. Both as CPAN::Config variables
    no_proxy      }  and as environment variables configurable.

You can set and query each of these options interactively in the cpan shell with the command set defined within the o conf command:

o conf <scalar option>

    prints the current value of the scalar option
o conf <scalar option> <value>

    Sets the value of the scalar option to value
o conf <list option>

    prints the current value of the list option in MakeMaker's neatvalue format.
o conf <list option> [shift|pop]

    shifts or pops the array in the list option variable
o conf <list option> [unshift|push|splice] <list>

    works like the corresponding perl commands.
运行cpan> m,大量错误提示似乎perl有问题,如何解决? hp ux11 ia64 perl 5.8.3
cpan> m
CPAN: Storable loaded ok
Going to read /.cpan/Metadata
Warning: Found only 0 objects in /.cpan/Metadata
CPAN: LWP::UserAgent loaded ok
Fetching with LWP:
  http://www.cpan.org/authors/01mailrc.txt.gz
Use of uninitialized value in hash element at /opt/perl/lib/site_perl/5.8.3/LWP/Protocol.pm line 55.
Use of uninitialized value in pattern match (m//) at /opt/perl/lib/site_perl/5.8.3/LWP/Protocol.pm line 58.
Use of uninitialized value in concatenation (.) or string at /opt/perl/lib/site_perl/5.8.3/LWP/Protocol.pm line 38.
Use of uninitialized value in string eq at /opt/perl/lib/site_perl/5.8.3/LWP/UserAgent.pm line 194.
LWP failed with code[501] message[Protocol scheme '' is not supported]
Fetching with LWP:
  http://cpan.linuxforum.net/authors/01mailrc.txt.gz
Use of uninitialized value in hash element at /opt/perl/lib/site_perl/5.8.3/LWP/Protocol.pm line 55.
Use of uninitialized value in pattern match (m//) at /opt/perl/lib/site_perl/5.8.3/LWP/Protocol.pm line 58.
Use of uninitialized value in concatenation (.) or string at /opt/perl/lib/site_perl/5.8.3/LWP/Protocol.pm line 38.
Use of uninitialized value in string eq at /opt/perl/lib/site_perl/5.8.3/LWP/UserAgent.pm line 194.
LWP failed with code[501] message[Protocol scheme '' is not supported]
Fetching with LWP:
  http://mirrors.dayouit.com/CPAN/authors/01mailrc.txt.gz
Use of uninitialized value in hash element at /opt/perl/lib/site_perl/5.8.3/LWP/Protocol.pm line 55.
Use of uninitialized value in pattern match (m//) at /opt/perl/lib/site_perl/5.8.3/LWP/Protocol.pm line 58.
Use of uninitialized value in concatenation (.) or string at /opt/perl/lib/site_perl/5.8.3/LWP/Protocol.pm line 38.
Use of uninitialized value in string eq at /opt/perl/lib/site_perl/5.8.3/LWP/UserAgent.pm line 194.
LWP failed with code[501] message[Protocol scheme '' is not supported]
。。。。。。

o conf http_proxy http://proxy:8080
o conf commit