Perl::...eNames(3pm)

πŸ’… Perl::...eNames(3pm) β€” a totally normal manpage, bestie

okay so real talk, this is the page for Perl::...eNames(3pm) (yes the displayed name got chopped, that's just how the header renders, don't come for me) and it's about a Perl::Critic policy that is genuinely so valid. Let's get into it.


✨ NAME ✨

Perl::Critic::Policy::Variables::ProhibitPerl4PackageNames β€” bestie, use the double colon (::) to separate your package name components instead of a single quote ('). That's it. That's the whole vibe. πŸŽ€


🫢 AFFILIATION 🫢

This policy is part of the core Perl::Critic distribution. so it ships with the whole thing, no extra install arc, no side quest. πŸ’–


🌸 DESCRIPTION 🌸

okay so, history lesson that actually eats: Perl 5 kept the single quote (') as a package component separator specifically so it'd stay backward compatible with previous perls. but even back then everybody was like "hmm, actually use the double colon (::) instead." πŸ¦‹

and then like, more than a decade passed since Perl 5 dropped, and the double colons have been overwhelmingly adopted, to the point where most people don't even know the single quote can do that. like, genuinely, the vibe check on that feature is "who told you this." 😭

so unless your entire goal in life is to obfuscate your code (and if it is... iconic of you, but no), just don't use them.

package Foo::Bar::Baz;    #ok
package Foo'Bar'Baz;      #not ok

the first one? a slay. the second one? a crime scene. πŸ’€


βš™οΈ CONFIGURATION βš™οΈ

this policy is not configurable except for the standard options. that's the whole situation, no knobs to fiddle with, no settings to gaslight. periodt. πŸ‘‘


πŸ‘€ SEE ALSO πŸ‘€

  • perlmod β€” go read it, it's the lore. πŸ“š

πŸ’œ AUTHOR πŸ’œ

Elliot Shank <perl@galumph.com> β€” thank you for your service, king. 🫑


Copyright (c) 2007-2014 Elliot Shank.

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.

so like, go forth, remix responsibly, keep the license file with it. πŸ™ˆβœ¨


and that's the page, bestie!! 🧚 this beauty shipped as perl v5.42.0 on 2024-10-23, so if you're citing it in a group chat, now you've got receipts. πŸ’…πŸŒΈ

πŸ“¦ where this page comes from