MojoMojo::Formatter::CPANHyperlink(3pm)

MojoMojo::Formatter::CPANHyperlink3pm

Automatically hyperlink cpan modules when using the syntax {{cpan some::module}}

Overview

Normally, to hyperlink to a CPAN module, you'd write:

    [MojoMojo::Formatter::CPANHyperlink](http://search.cpan.org/perldoc?MojoMojo::Formatter::CPANHyperlink)

This plugin lets you write just

    {{cpan MojoMojo::Formatter::CPANHyperlink}}

Just like POD, it supports adding a section after the module name:

    {{cpan Catalyst::Manual::Cookbook/Deployment}}

will create a link to

    http://search.cpan.org/perldoc?Catalyst::Manual::Cookbook#Deployment

Sections can contain any characters, except two consecutive closed braces:

    {{cpan Catalyst::Test/($res, $c) = ctx request( ... ); }}

will link to

    http://search.cpan.org/perldoc?Catalyst::Test#($res,_$c)_=_ctx_request(_..._);

In anticipation of future plugin syntax, you can optionally add a trailing slash

    {{cpan Some::Module/Section /}}

Methods

format_content_order

The CPANHyperlink formatter has no special requirements in terms of the order it gets run in, so it has a priority of 10.

format_content

Calls the formatter. Takes a ref to the content as well as the context object.

Releases

5 releases since Debian 6.0 (Squeeze); the text changed 4 times.

  1. 6.0
  2. 7
  3. 8
  4. 9
  5. 10

Authors

Dan Dascalescu, <http://dandascalescu.com>

License

This library is free software. You can redistribute it and/or modify it under the same terms as Perl itself.

From libmojomojo-perl 1.12+dfsg-1 in Debian 10 (Buster). Parsed by carta from the page's man source.