How do I tell CPAN to install all dependencies?

后端 未结 10 1008
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-11-30 16:27

How do I tell CPAN to install all dependencies?

I tried setting these in cpan:

cpan> o conf prerequisites_policy follow
cpan> o co         


        
10条回答
  •  悲&欢浪女
    2020-11-30 17:19

    The latest and greatest answer to this question is to use cpanm instead (also referred to as App::cpanminus or cpanminus)!

    DESCRIPTION

    cpanminus is a script to get, unpack, build and install modules from CPAN and does nothing else.

    It's dependency free (can bootstrap itself), requires zero configuration, and stands alone. When running, it requires only 10MB of RAM.

    To bootstrap install it:

    curl -L http://cpanmin.us | perl - --sudo App::cpanminus
    

    or if you are using perlbrew simply

    perlbrew install-cpanm
    

    or from cpan itself:

    cpan install App::cpanminus
    

    From then on install modules by executing (as root if necessary)

    cpanm Foo::Bar
    

提交回复
热议问题