in reply to Re^2: Using Exporter module
in thread Using Exporter module
Exporting doesn't mean what you think it does, at least not in Perl. To export is to remove the requirement to use a fully qualified name.
What you really want, it seems, is to make a function uncallable from outside of {something}. (A namespace? Code that originated from a certain file?) Perl doesn't provide any direct means of doing that. Perl considers this a documentation issue. If a user of your module disreguards your documentation and call a function he shouldn't, it's his own foot he's shooting.
Many programmers prepend an underscore (_) to the name of their private subs/methods as an indication that they shouldn't be called.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Using Exporter module
by Joost (Canon) on Jul 18, 2007 at 22:45 UTC | |
by ikegami (Patriarch) on Jul 19, 2007 at 14:32 UTC | |
|
Re^4: Using Exporter module
by perlCrazy (Monk) on Jul 19, 2007 at 12:42 UTC |