Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

The Module of Modules: CPAN

Modules make possible in an afternoon, what would take many months without them. It is because of this the time needed to learn to use them is well spent. Once you learn to effectively use modules, you will wonder how you ever got by without them. Switching from Perl without modules, to Perl with modules, is as big a step is ease of use and project clarity as moving from C to Perl was is the first place.

So, my favorite module is the module that brings me my modules: CPAN.pm

This should have come with your perl dist. I won't get into how to use it in your program, as most modules are used; no, there is a very special power within CPAN that no monk can live without. This is the CPAN shell. To invoke, issue the following incantation:

perl -MCPAN -e'shell'

It will probably tell you some things, like that there is a newer version of the spell, and that you should fetch some network Bundle:: 's. Follow these instructions, always.

Now, to look for a module, light your purifying incense, and chant:

i /keyword/

Give it a try. If you don't know what to search for, try i /lingua/.

When you find something that sounds way-super-cool, concentrate on:

install package::name

For example, you might want to install Lingua::EN::Gender. This will download the tarball, configure it, make it, make test and make install it for you, saving you the trouble. Why should a Perl hacker have to wrestle with gcc? I say, let's leave the C coding to St. Wall, and his Disciples.

When you first run it, it will ask you some congif questions; I recommend asking the Gods to install any dependencies for you; I have found them to be better at knowing these things than I am.

It might help to run this as root.

If make test fails, you can probably go to $HOME/.cpan/build and make install. Usually when make test fails, it is becuase no time was spent developing the test, and instead of making it always pass, they like to make it always fail... but this is rare. Most packages are written well.

-- Aighearach

jdporter - changed title from single word "CPAN"


In reply to CPAN.pm by Aighearach

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (4)
As of 2024-04-19 23:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found