logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

Perl::Critic::Policy::Variables::ProtectPrivateVars - Prevent access to private vars in other packages.

Affiliation

       This Policy is part of the core Perl::Critic distribution.

Author

       Chris Dolan <cdolan@cpan.org>

Configuration

       This Policy is not configurable except for the standard options.

Description

       By convention Perl authors (like authors in many other languages) indicate private methods and variables
       by inserting a leading underscore before the identifier.  This policy catches attempts to access private
       variables from outside the package itself.

History

       This policy is inspired by a similar test in B::Lint

Name

       Perl::Critic::Policy::Variables::ProtectPrivateVars - Prevent access to private vars in other packages.

See Also

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

See Also