# 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->balance . "\n"; }