Perl::...ateVars(3pm)

okay bestie, welcome to the User Contributed Perl Documentation page for Perl::Critic::Policy::Variables::ProtectPrivateVars(3pm) πŸ’…βœ¨ This one is short but iconic.

🌸 NAME 🌸

Perl::Critic::Policy::Variables::ProtectPrivateVars β€” prevent access to private vars in other packages. No cap. πŸš«πŸ‘€

πŸŽ€ AFFILIATION πŸŽ€

This Policy is part of the core Perl::Critic distribution. She's in the core squad, bestie. πŸ’–

πŸ¦‹ DESCRIPTION πŸ¦‹

So here's the vibe: by convention, Perl authors (like authors in many other languages) indicate private methods and variables by inserting a leading underscore before the identifier. _like_this, iykyk. This policy catches attempts to access private variables from outside the package itself. That's the whole main character move. ✨

πŸ“ CONFIGURATION πŸ“

This Policy is not configurable except for the standard options. That's it. No extra knobs, no secret menu. πŸ’…

🌈 HISTORY 🌈

This policy is inspired by a similar test in B::Lint. Cute lore, fr fr. 🧚

πŸ‘‘ SEE ALSO πŸ‘‘

  • Perl::Critic::Policy::Subroutines::ProtectPrivateSubs

πŸ’œ AUTHOR πŸ’œ

Chris Dolan <cdolan@cpan.org> 🫢

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.


This page came from perl v5.42.0 and is dated 2024-10-23 β€” byeee, bestie πŸ«ΆπŸ’–

πŸ“¦ where this page comes from