What's the easiest way to install a missing Perl module?

前端 未结 24 2707
情深已故
情深已故 2020-11-21 05:28

I get this error:

Can\'t locate Foo.pm in @INC

Is there an easier way to install it than downloading, untarring, making, etc?

24条回答
  •  悲哀的现实
    2020-11-21 05:55

    2 ways that I know of :

    USING PPM :

    With Windows (ActivePerl) I've used ppm

    from the command line type ppm. At the ppm prompt ...

    ppm> install foo
    

    or

    ppm> search foo
    

    to get a list of foo modules available. Type help for all the commands

    USING CPAN :

    you can also use CPAN like this (*nix systems) :

    perl -MCPAN -e 'shell'
    

    gets you a prompt

    cpan>
    

    at the prompt ...

    cpan> install foo  (again to install the foo module)
    

    type h to get a list of commands for cpan

提交回复
热议问题