Perl::...tLinks(3pm)
π Perl::Critic::Policy::Documentation::ProhibitAdjacentLinks π
okay bestie, so this one lives in the Perl::Critic family (specifically it's a Perl::Critic::Pulp girlie), and it's all about consecutive L<> links. Like, links that are just... touching. no space, no comma, no nothing. just two L<> sequences pressed up against each other in a paragraph. π
β¨ DESCRIPTION β¨
so this policy is part of the "Perl::Critic::Pulp" add-on, and what it's asking is simple: please don't put two adjacent L<> sequences in a paragraph. that's it. that's the whole vibe. for example:
=head1 SEE ALSO
L<Foo> # bad
L<Bar>
the idea here is that adjacent L<> like this is probably a missing comma or missing text. like, your fingers just forgot to type something. and ngl it's so easy to make this mistake in a "SEE ALSO" list β that's literally the natural habitat of this bug. π¦
this is normally only very minor stuff, and on that basis this policy is lowest severity and lives under the "cosmetic" theme (see "POLICY THEMES" in Perl::Critic).
πΈ Exceptions πΈ
an exception gets made for two links to the same page where one (or both) have display text, like:
See L<My::Package> L<new()|My::Package/Contructors> for more.
this hyperlinks both the package name and a function etc within it, which is actually kind of iconic. π
perhaps exactly when to allow or disallow this might be loosened or tightened in the future β that's a maybe, not a promise, okay? adjacent linking is fairly unusual though, and too much linking is often not a good thing since the meaning ought to be made clear in plain text too. periodt.
π Disabling π
if you don't care about this sort of thing at all (valid honestly), 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 included in the violation reported. π so you may need to look carefully at the line to see the problem β and also at the following line, if the adjacent link is hanging out on the next line. lowkey annoying ngl, but there it is.
π₯ SEE ALSO π₯
Perl::Critic::PulpPerl::Critic::Policy::Documentation::ProhibitDuplicateSeeAlsoPerl::Critic::Policy::Documentation::ProhibitLinkToSelfPerl::Critic::Policy::Documentation::RequirePodLinksIncludeTextPerl::Critic::Policy::Documentation::RequireLinkedURLs
π HOME PAGE π
http://user42.tuxfamily.org/perl-critic-pulp/index.html
π COPYRIGHT π
Copyright 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2019, 2021 Kevin Ryde
Perl-Critic-Pulp is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, or (at your option) any later version.
Perl-Critic-Pulp is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with Perl-Critic-Pulp. If not, see <http://www.gnu.org/licenses/>.
okay that's the whole page bestie, no cap π«Ά this was documented for perl v5.40.1 and dated 2025-10-21, and it came to you courtesy of the User Contributed Perl Documentation crew. slay, go forth and space out your links πβ¨π
π¦ where this page comes from
- ubuntu resolute: libperl-critic-pulp-perl 100-1 Β· GPL-3.0-or-later
- ubuntu stonking: libperl-critic-pulp-perl 100-1 Β· GPL-3.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms