NAME
Perl::Critic::Policy::Documentation::ProhibitAdjacentLinks - consecutive L<> links
DESCRIPTION
This policy is part of the Perl::Critic::Pulp
addon. It asks you not to have two adjacent L<> sequences in a paragraph. For example,
=head1 SEE ALSO
L<Foo> # bad
L<Bar>
The idea is adjacent L<> like this is probably a missing comma or missing text. It's easy to do in a "SEE ALSO" list.
Of course this is only a very minor typo or readability and on that basis this policy is under the "cosmetic" theme (see "POLICY THEMES" in Perl::Critic) and lowest severity.
Exceptions
An exception is made for two links to the same page where one (or both) have display text,
See L<My::Package> L<new()|My::Package/Contructors> for more.
This hyperlinks both the package name and a function etc within it. Precisely when to allow or disallow this sort of thing might want to be loosened or tightened in the future. Adjacent linking is fairly unusual though, and too much linking is often not a good thing if the meaning is to be clear in plain text too.
Disabling
If you don't care about this sort of thing at all you can disable ProhibitAdjacentLinks
from your .perlcriticrc in the usual way (see "CONFIGURATION" in Perl::Critic),
[-Documentation::ProhibitAdjacentLinks]
BUGS
The column position of the offending adjacency is not worked into the violation report yet. It may need a careful look at the line to see the problem, and at the following line when to adjacent links are across a newline.
SEE ALSO
Perl::Critic::Pulp, Perl::Critic::Policy::Documentation::RequirePodLinksIncludeText, Perl::Critic::Policy::Documentation::RequireLinkedURLs