Perl commonly marks private methods with a leading underscore. Example:
sub new {} # construct a new object sub mymethod {} # public method for an object sub _mymethod2 {} # private method for an object
There is no technical way to prohibit someone from using a private method. You can write lots of code to try to restrict access but they can undo whatever you have written!
So I recommend you just use a leading underscore and don't describe _mymethod2() as a public interface in your POD( you are writing documentation, right? ;) ).
In reply to Re: Hiding methods of class
by Herkum
in thread Hiding methods of class
by isha
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |