Perl::...tLinks(3pm)

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::Pulp
  • Perl::Critic::Policy::Documentation::ProhibitDuplicateSeeAlso
  • Perl::Critic::Policy::Documentation::ProhibitLinkToSelf
  • Perl::Critic::Policy::Documentation::RequirePodLinksIncludeText
  • Perl::Critic::Policy::Documentation::RequireLinkedURLs

🏠 HOME PAGE 🏠

http://user42.tuxfamily.org/perl-critic-pulp/index.html


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