Perl::C...vateData(3)

πŸ“¦
version 1.0.0 Β· 2 versions
, in fedora 43

πŸ’– NAME πŸ’–

Perl::Critic::Policy::ValuesAndExpressions::ProhibitAccessOfPrivateData β€” the manual page you're reading is Perl::C...vateData(3), bestie, it's just the long name with the middle chopped out for the header. πŸŽ€


πŸ¦‹ AFFILIATION πŸ¦‹

This policy is part of Perl::Critic::Nits. That's the friend group it runs with.


✨ VERSION ✨

This document describes Perl::Critic::Policy::ValuesAndExpressions::ProhibitAccessOfPrivateData version 1.0.0. Iconic. No notes.


🌸 SYNOPSIS 🌸

The whole assignment, in one sentence:

Requires that modules and scripts do not break encapsulation by directly accessing the contents of hash-based objects.

Like… do not go rummaging through somebody's stuff. That's the rule. πŸ’…


πŸ’œ DESCRIPTION πŸ’œ

Okay so here's the tea β˜• β€” reaching into an object's data directly breaks encapsulation and should be avoided. Full stop.

The vibe crime in question:

$object->{ some_key }

See that? That's you opening your bestie's bag without asking. πŸ™ˆ

Be careful, and only access private data through the getter and setter methods the class provides. That's the door. Use the door. πŸšͺ✨


πŸ‘‘ INTERFACE πŸ‘‘

Stadard for a Perl::Critic::Policy.

(yes, that's exactly how the original spells it β€” we do not touch the lore, we only report it 🫢)


πŸ’€ DIAGNOSTICS πŸ’€

None.

Literally nothing. Silence. The calmest section on this whole page. 😭


🧚 CONFIGURATION AND ENVIRONMENT 🧚

This policy has no configuration options beyond the standard ones. So don't go looking for extra knobs, there aren't any. It's giving minimal, it's giving low-maintenance, we love that for it. πŸ’–


πŸ“ DEPENDENCIES πŸ“

  • Perl::Critic

That's the one. That's the whole list.


🌈 INCOMPATIBILITIES 🌈

None reported. No drama. Peace and love. ✌️


πŸ”₯ BUGS AND LIMITATIONS πŸ”₯

No bugs have been reported. Slay.

But β€” and listen closely bestie, this is the important part β€” false positives may be encountered if, internal to a module, the code does not use $self, $class, or $package to refer to the object it represents. So if you're writing your object some other way, this policy might side-eye you unfairly. It's not personal, it just doesn't recognize your pronouns (the pronouns here being $self, $class, and $package). 😭

Please report any bugs or feature requests to "bug-perl-critic-nits@rt.cpan.org", or through the web interface at <http://rt.cpan.org>.

Don't be shy about it either. If something's broken, say something. Communication is self-care. πŸ’…

πŸŽ€ AUTHOR πŸŽ€

Kent Cowgill, "<kent@c2group.net>". Give them their flowers. πŸ’


Copyright (c) 2007, Kent Cowgill "<kent@c2group.net>". All rights reserved.

This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See perlartistic.

So like, go forth, use it, remix it, just respect the terms. Periodt.


Okay bye bestie β€” this page came to you from perl v5.42.0, dated 2025-07-25, filed under Perl::C...vateData(3). Go protect those private members. No cap. πŸ¦‹βœ¨

πŸ“¦ where this page comes from