et viola! only Foos can call bar. Sorry if that's not exactly helpful. The other option is:class Foo { my method bar {...} }
sub bar { croak "Oi! You're not a foo!" unless $_[0]->isa(__PACKAGE__); }
In reply to Re: Private Class Methods
by pdcawley
in thread Private Class Methods
by dhable
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |