in reply to Instance field access from private methods
Basically, unless you create a lexical variable that contains a CODE ref, there is no way to really create and enforce a private method that I know of. This is by design BTW. Perl wisdom says that you shouldn't need a shotgun to keep people out of your living room. Thus your private methods are just conventions based on name normally. Like sub __private_method {}; rrsub public_method { my $object = shift; $object->private_method; } sub private_method { my $object = shift; ... }
|
|---|