# protected method printMe, silly example actually sub printMe { my $self = shift; caller(0)->isa(__PACKAGE__) || confess "cannot call protected +method\n"; # do something silly for now print $self->account . " " . $self->name . " " . $self->balanc +e . "\n"; }
In reply to Re^2: OO - best way to have protected methods
by gargle
in thread OO - best way to have protected methods
by gargle
For: | Use: | ||
& | & | ||
< | < | ||
> | > | ||
[ | [ | ||
] | ] |