2

cpan – The Perl Module Manager


Posted by Artem Russakovskii on October 12th, 2007 in Linux, Programming

Updated: March 19th, 2008

cpan is a perl module manager. To get into cpan, login as root and type in

cpan

Install a module:

cpan install MODULE

Upgrade a module:

cpan upgrade MODULE

Reinstall a module or force install in case of failed tests:

force install MODULE

See a list of upgradable modules:

r

See cpan configuration (that's the letter 'o'):

o conf

Update an option in cpan configuration:

o conf OPTION_NAME OPTION_VALUE

It is always nice to:

upgrade CPAN
install Bundle::CPAN

If there's an error making a Perl module, it can be caused by a missing make path in cpan configuration. In cpan, type in:

o conf

which will show all cpan options, then:

o conf make /usr/bin/make
o conf commit

A good option is:

o conf prerequisites_policy follow

By default, cpan will prompt to install every dependecy while installing a module. This option will automatically install dependencies without prompting.

● ● ●

Artem Russakovskii is a San Francisco programmer, blogger, and future millionaire (that last part is in the works). Follow Artem on Twitter (@ArtemR) or subscribe to the RSS feed.

In the meantime, if you found this article useful, feel free to buy me a cup of coffee below.



Share
  • Dale

    I love how nothing ever works for me.

    Parse errors: Bad plan. You planned 2 tests but ran 1.
    Files=37, Tests=204, 2 wallclock secs ( 0.15 usr 0.13 sys + 0.95 cusr 0.27 csys = 1.50 CPU)
    Result: FAIL
    Failed 23/37 test programs. 9/204 subtests failed.
    make: *** [test_dynamic] Error 255
    MKUTTER/SOAP-Lite-0.710.07.tar.gz
    /usr/bin/make test — NOT OK
    //hint// to see the cpan-testers results for installing this module, try:
    reports MKUTTER/SOAP-Lite-0.710.07.tar.gz
    Running make install
    make test had returned bad status, won't install without force
    Failed during this command:
    MKUTTER/SOAP-Lite-0.710.07.tar.gz : make_test NO

  • http://beerpla.net Artem Russakovskii

    Dale, there should be more errors, can you paste the full output? You're most likely missing some software…