Class::Std creates something like this:
sub private { my $caller = caller; croak "Can't call private method from $caller" if $caller ne __PACKAGE__; }
That's paraphrased. If you want, you can check caller against an access list or do other funny things.
In reply to Re: Howto keep private methods private?
by kyle
in thread Howto keep private methods private?
by perl-diddler
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |