Will the Exporter prevent someone from calling my private_method but still allow them to call the public_method?package MyClass; use Exporter; use strict; use vars qw/ @EXPORT @EXPORT_FAIL /; @EXPORT = qw/ public_method /; @EXPORT_FAIL = qw/ private_method /; sub new { # bless reference ... } sub public_method { # ... do public stuff including calling private_method } sub private_method { # ... do stuff only class things should know }
In reply to Private Class Methods by dhable
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |