Perl::Critic::Policy::Documentation::RequirePodLinksIncludeText(3pm)

Perl::Critic::Policy::Documentation::RequirePodLinksIncludeText3pm

Provide text to display with your pod links.

Affiliation

This Policy is part of the core Perl::Critic distribution.

Overview

This Policy requires your POD links to contain text to override your POD translator's default link text, where this is possible. Failure to provide your own text leaves you at the mercy of the POD translator, which may display something like "L<Foo>" as "the Foo manpage".

By default, links that specify a documentation section (for example, "L<Foo/bar>", or "L</bar>") are exempt from this Policy.

Configuration

This Policy has two boolean options to configure the handling of links that specify a documentation section.

The "allow_external_sections" option configures the handling of links of the form "L<Foo/bar>". If true, such links are accepted even without a text specification. Such links tend to be turned into something like "bar in Foo".

By default, this option is asserted. If you want to prohibit things like "L<Foo/bar>" (while allowing things like "L<< Foo->bar()|Foo/bar >>"), put something like this in your .perlcriticrc:

 [Documentation::RequirePodLinksIncludeText]
 allow_external_sections = 0

The "allow_internal_sections" option configures the handling of links of the form "L</bar>". If true, such links are accepted even without a text specification. Such links tend to be turned into something like "bar".

By default, this option is asserted. If you want to prohibit things like "L</bar>" (while allowing things like "L<bar()|/bar>"), put something like this in your .perlcriticrc:

 [Documentation::RequirePodLinksIncludeText]
 allow_internal_sections = 0

Releases

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

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

Author

Thomas R. Wyant, III wyant at cpan dot org

From libperl-critic-perl 1.132-1 in Debian 10 (Buster). Parsed by carta from the page's man source.