Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw

Re: How to read CPAN documentation (code)

by toolic (Bishop)
on Jul 06, 2012 at 13:04 UTC ( #980254=note: print w/replies, xml ) Need Help??

in reply to How to read CPAN documentation

After I read the documentation, I head straight for code examples.

A good CPAN distribution will have several tests, conventionally in the t directory. For example, on the JSON page, follow the MANIFEST link. I see roughly 50 test files. In these files, there are examples of how functions and methods are called (specific values passed to those functions), and examples of what is returned from functions.

Some CPAN distributions have examples directories ("eg", "bin" etc.) which consist of short command line utilities for using the modules.

Look at the source code itself. Sometimes authors embed helpful comments.

If you want more examples of usage, try a Super Search.

If you start using a module, and you find the POD inadequate, please submit specific enhancements via RT. CPAN is not just a spectator sport; you can participate too. If you include a patch, that increases the chances of the documentation being improved, not just for you, but for the whole community. Even if the patch is not applied by the author, the RT report is visible to everyone.

Replies are listed 'Best First'.
Re^2: How to read CPAN documentation (code)
by perl.j (Pilgrim) on Jul 06, 2012 at 13:35 UTC

    Never usually look in the files of the module. I just use 'em :-). Thanks for the advice! I'll try it.


Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://980254]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (2)
As of 2023-10-01 21:02 GMT
Find Nodes?
    Voting Booth?

    No recent polls found