http://qs1969.pair.com?node_id=157029


in reply to Private Class Methods

By "private" do you mean it can be only called from inside your actual module? If so, then you could do something like this. You can get around it, but it requires a bit of effort (and the know-how). Here's a function to turn any method into a private method.
sub privacy { my $owner = __PACKAGE__; my ($pkg, $file, $func) = (caller 1)[0,1,3]; unless ($pkg eq $owner and $file eq __FILE__) { require Carp; Carp::croak("'$func' is a private method of $owner"); } }

_____________________________________________________
Jeff[japhy]Pinyan: Perl, regex, and perl hacker, who'd like a (from-home) job
s++=END;++y(;-P)}y js++=;shajsj<++y(p-q)}?print:??;