Jump to content
The Uniform Server Community

How do I install a new module via CPAN?


nv1962
 Share

Recommended Posts

I checked Perldoc for the official way to download and install modules, here:

 

http://perldoc.perl.org/perlfaq8.html#How-...le-from-CPAN%3F

 

And it says, naturally:

The easiest way is to have a module also named CPAN do it for you. This module comes with perl version 5.004 and later.

 

$ perl -MCPAN -e shell

 

cpan shell -- CPAN exploration and modules installation (v1.59_54)
ReadLine support enabled

 

cpan> install Some::Module

 

But if I call Perl with the CPAN arguments as shown in the first of three blocks above from the command line (in Windows) it complains that it doesn't speak CPAN-ese.

 

So... How do I properly call CPAN?

Link to comment
Share on other sites

The thing is, I'm not sure which files to pick from the uncompressed files that come in the AS version of ActivePerl, in order to make either CPAN or PPM work (as I understand it, those are the two "recommended" methods to download and install Perl modules that haven't been included in the Uniserver package.)

 

Just to make sure I understood it -- and if so, hopefully it'll be of help to others tracing this issue later as well -- here's what I've done so far:

 

- Went to the Active Perl site: http://www.activeperl.com/

- Downloaded their current Windows version (the AS version, not the MSI version!) of their ActivePerl, after optionally registering. By the way: registering is a good idea because they send you an e-mail with helpful links for further support to install and use Perl!

- Uncompressed the .ZIP archive into some folder (since I'm not running Perl "directly" but via Uniserver, and will copy all needed modules / files into the Uniserver folder, the location of the uncompressed ActivePerl files doesn't really matter)

- Looked at the available on-line documentation (not in the least, the ample documentation provided here (link) by ActiveState themselves)

- Got stumped by the dearth of seemingly related modules and files for either CPAN or PPM... Not knowing which files to pick!

 

Thanks again for your help...

 

PS: I don't have a problem at all with CPAN and/or PPM not being included "out of the box" in the Uniserver package, as Perl comprises almost 40MB in just over 3,000 files in the AS version. Probably the biggest strength of Uniserver is its compact size, so no problem with the "lean" standard install. It's just that I'm trying to learn how to do it, and hopefully a handy "how-to" in order to get CPAN or PPM working with the standard Uniserver will come out of it, in this topic.

Link to comment
Share on other sites

Thats what i'm trying to figure out. Not much of a big Perl fan but i am trying to get PPM to work on the server as it seems most Perl users need it.

 

When i do, expect it here ;)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...