in reply to Private Class Methods
You could always wait for Perl 6.
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 Section
Meditations