Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

learn from CPAN perl hackers #3

Closed
hackergrrl opened this issue Apr 18, 2016 · 6 comments
Closed

learn from CPAN perl hackers #3

hackergrrl opened this issue Apr 18, 2016 · 6 comments

Comments

@hackergrrl
Copy link

Perl hackers have been writing great READMEs in a consistent format for ages: http://search.cpan.org/~lloydg/List-Zip-0.04/lib/List/Zip.pm

Key elements:

  1. Name + Tagline: a tiny sentence that describes what the module does.
  2. A "Description" section that gives people without necessary background the means to understand the module's purpose.
  3. A concrete, runnable example that the user can copy locally and experiment with.
  4. A Methods listing that documents the public API, complete with examples where it helps.
  5. See Also: a mechanism for discovering other modules that work great with this one. (audio-lab does a great job with this throughout their audio modules)
  6. Copyright / License (I'm more interested in the latter)
@RichardLitt
Copy link
Owner

Thanks! This is great.

@RichardLitt
Copy link
Owner

Thanks! Worked some of these in. I think they are perl specific, sometimes, and I want to keep this as general as possible.

@hackergrrl
Copy link
Author

Here are a few tidbits that are pretty general but extremely spot on:

from perlmodstyle:

The level of detail in Perl module documentation generally goes from
less detailed to more detailed. Your SYNOPSIS section should
contain a minimal example of use (perhaps as little as one line of
code; skip the unusual use cases or anything not needed by most
users); the DESCRIPTION should describe your module in broad terms,
generally in just a few paragraphs; more detail of the module's
routines or methods, lengthy code examples, or other in-depth
material should be given in subsequent sections.

Ideally, someone who's slightly familiar with your module should be
able to refresh their memory without hitting "page down". As your
reader continues through the document, they should receive a
progressively greater amount of knowledge.

from http://mathforum.org/ken/perl_modules.html#document:

Your documentation is complete when someone can use your module without ever
having to look at its code. This is very important. This makes it possible for
you to separate your module's documented interface from its internal
implementation (guts). This is good because it means that you are free to
change the module's internals as long as the interface remains the same.

Remember: the documentation, not the code, defines what a module does.

@RichardLitt
Copy link
Owner

I should merge these thoughts in with a reasoning for each section in the spec. Reopening to remind myself to.

@RichardLitt RichardLitt reopened this May 13, 2016
@RichardLitt RichardLitt mentioned this issue May 19, 2016
18 tasks
@hackergrrl
Copy link
Author

hackergrrl commented May 26, 2016 via email

@RichardLitt
Copy link
Owner

yes!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants