in reply to private sub routine
In a function oriented package, the subs that are meant to be called by others are specified in the @EXPORT (), @EXPORT_OK() lines. In an OO module, you will see subs with names that begin with "_". Those are often names of methods (subroutines) that shouldn't be called by outsiders.
Basically, I suggest "play by the rules and get along with others". I think you are doomed to a life of unhappiness and pain if you insist that Perl work like your other language, which I am guessing is Java. On the plus side, a Perl program is often 1/10th or less than the size of a Java program, so there is less to keep track of!
Perl does allow you to "shoot yourself in the foot". If you provide a "fully qualified name", you can call that sub X in spite of naming and export conventions. I would say simply: "don't do that".
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: private sub routine
by LanX (Saint) on Sep 03, 2009 at 00:05 UTC | |
by Marshall (Canon) on Sep 03, 2009 at 01:07 UTC | |
by ig (Vicar) on Sep 03, 2009 at 11:29 UTC | |
by Marshall (Canon) on Sep 07, 2009 at 23:40 UTC | |
by LanX (Saint) on Sep 08, 2009 at 09:43 UTC |