lcpan tips 001: doc

About this series: a collection of short, daily blog posts about lcpan tips/recipes. Some posts will also end up in the upcoming App::lcpan::Manual::Cookbook POD to be included in the App-lcpan distribution.

About lcpan: an application to download and index a mini CPAN mirror on your local filesystem, so in effect you will have something like your own CPAN with a command-line tool (or perl API) to query and extract information from your mirror. I find it perfect for my own personal use when working offline.

The first post will be about the doc subcommand, new in lcpan 0.69. This can be used to view POD documentation for CPAN modules or scripts, even those that are not installed on your system:

% lcpan doc Win32::HTA
% lcpan doc meta  ;# view script documentation

There are a few options available. First, sometimes there’s both the .pm and .pod (one such case: PSGI.pod and, and the doc is in .pod). lcpan will sometimes guess incorrectly which one you want, so to choose specifically the .pod or .pm:

% lcpan doc PSGI.pod
% lcpan doc

Also, there might be cases where a script name is the same as module name. By default, the module will be chosen first. To specifically choose script, use -s (--script).

To dump the raw version instead of rendering the POD, use -r (--raw):

% lcpan -r

9 thoughts on “lcpan tips 001: doc

  1. Pingback: lcpan tips 016: Bootstrap database | perlancar's blog

  2. Pingback: lcpan tips 017: Indexing DarkPANs | perlancar's blog

  3. Pingback: lcpan tips 018: How did I use lcpan in 2018? | perlancar's blog

  4. Pingback: lcpan tips 019: Helping people find related modules more easily | perlancar's blog

  5. Pingback: lcpan tips 020: Finding circular dependency | perlancar's blog

  6. Pingback: | perlancar's blog

  7. Pingback: lcpan tips 022: Testing all dependents | perlancar's blog

  8. Pingback: lcpan tips 021: Install CPAN distribution when you only know a script’s name (2) | perlancar's blog

  9. Pingback: lcpan tips 023: What’s new (including whatsnew) | perlancar's blog

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s