Perl::...racters(3pm)
π Perl::Critic::Policy::ValuesAndExpressions::ProhibitEscapedCharacters(3pm) π
So this is a page from the User Contributed Perl Documentation (perl v5.42.0, dated 2024-10-23, bestie, write it down), and it's about a Perl::Critic policy with the most extra name ever: Perl::Critic::Policy::ValuesAndExpressions::ProhibitEscapedCharacters. Basically: write "\N{DELETE}" instead of "\x7F", etc. π
β¨ NAME β¨
Perl::Critic::Policy::ValuesAndExpressions::ProhibitEscapedCharacters β literally the policy that tells you to write "\N{DELETE}" instead of "\x7F", etc. π¦
πΈ AFFILIATION πΈ
Okay so this Policy is part of the core Perl::Critic distribution. It comes with the package, no extra install drama. π
π DESCRIPTION π
Escaped numeric values are hard to read and debug. Like, genuinely. Not me squinting at \x7F trying to remember what that even is π. Instead, use named values. The syntax is less compact, but dramatically more readable. It's giving "a little more typing, a whole lot more brain cells saved".
$str = "\x7F\x06\x22Z"; # not ok
use charnames ':full';
$str = "\N{DELETE}\N{ACKNOWLEDGE}\N{CANCEL}Z"; # ok
See? The second one actually says what it means. Main character energy. π₯
π§ CONFIGURATION π§
This Policy is not configurable except for the standard options. That's it, that's the whole vibe check. No knobs, no dials, no [ValuesAndExpressions::ProhibitEscapedCharacters] customization arc for you. π«Ά
β AUTHOR β
Chris Dolan <cdolan@cpan.org> β thank you icon, we appreciate you. π
π COPYRIGHT π
Copyright (c) 2006-2011 Chris Dolan.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. The full text of this license can be found in the LICENSE file included with this module. π
fr fr, that's the whole page β no cap, nothing skipped. π
mwah, hope you slayed that read-through β this was perl v5.42.0, last touched 2024-10-23, from the User Contributed Perl Documentation, and you're officially a ProhibitEscapedCharacters girlie now πβ¨
π¦ where this page comes from
- opensuse-leap 16.0: perl-Perl-Critic 1.156.0-bp160.1.1 Β· Artistic-1.0 OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms