Perl::...sMarkup(3pm)
π NAME π
Perl::Critic::Policy::Documentation::ProhibitBadAproposMarkup β bestie, please don't use C<> markup in a NAME section, it's giving chaos π
(also this page header literally says Perl::...sMarkup(3pm) because the real name is too long to fit, girls with long names know the struggle π
)
πΈ DESCRIPTION πΈ
Okay so this policy is part of the Perl::Critic::Pulp add-on, and it's basically begging you: do not write C<> markup in the NAME section of your POD. Why? Because it comes out absolutely cursed in the man-db apropos database. Not cute. Not slay. Just cursed.
Like, say you do this:
=head1 NAME
foo - like the C<bar> program # bad
and pod2man formats that C<> using nroff macros, which man-db's lexgrog program does not expand. So your lovely apropos description line ends up looking like:
foo - like the *(C`bar*(C' program
literally π the *(C bits are just hanging out there, uninvited, no vibe check passed.
Okay but here's the thing β the actual formatted man output? Totally fine. The text you wanted is in there, it's just wrapped in those*(Cbits like it's wearing an ugly sweater to a party. So on that basis this policy is low severity and lives under the "cosmetic" theme (see"POLICY THEMES"in Perl::Critic). It's a glow-up suggestion, not a red alert.
The NAME section = everything from =head1 NAME down to the next =head1. Periodt.
Other markup like B<>, I<> and F<> is allowed, bestie, because pod2man uses builtin \fB etc directives for those, which lexgrog actually recognises. So those ones ate. π
And heads up: =begin :man and =begin :roff blocks are checked, since Pod::Man processes those. Other =begin blocks get ignored because they won't appear in the roff output anyway. π¦
π« Disabling π«
So if you genuinely want markup in that NAME line β maybe printed output matters more to you than apropos, and honestly valid β you can always turn this off from your .perlcriticrc the usual way (see "CONFIGURATION" in Perl::Critic):
[-Documentation::ProhibitBadAproposMarkup]
Or in a single individual file, with the usual ## no critic:
## no critic (ProhibitBadAproposMarkup)
β οΈ but listen β if theNAMEpart comes after an__END__token, then you needPerl::Critic1.112 or higher for that annotation to work (and the annotation has to be before the__END__, no cap).
β¨ SEE ALSO β¨
Perl::Critic::PulpPerl::CriticPerl::Critic::Policy::Documentation::RequirePackageMatchesPodNamePerl::Critic::Policy::Documentation::RequirePodSectionsPerl::Critic::Policy::Documentation::ProhibitVerbatimMarkupman(1)apropos(1)lexgrog(1)
π HOME PAGE π
<http://user42.tuxfamily.org/perl-critic-pulp/index.html>
π COPYRIGHT π
Copyright 2009, 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/>.
and that's the whole page babes π this one shipped in perl v5.40.1, dated 2025-10-21, filed under Perl::...sMarkup(3pm) (yes the header is still squished, we don't talk about it) πβ¨
π¦ 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