[Israel.pm] OO Perl and Exporter

Shlomo Yona shlomo at cs.haifa.ac.il
Tue Dec 28 02:09:33 PST 2004

On Tue, 28 Dec 2004, Offer Kaye wrote:

> Question for the OO gurus - assuming I supply all the required
> methods, setters and getters, etc., would I ever want to use @EXPORT,
> or even @EXPORT_OK? Doesn't that defeat the idea of encapsulation?

Yes. It does.
However, importing stuff into the current namespace (main)
is something that is "easily forgiven".
As long as you and the other maintainers of your code know
where every variable and method come from, it is considered OK...

You can imaging how ugly a code that has stuff like


in it looks like...

Shlomo Yona
shlomo at cs.haifa.ac.il

More information about the Perl mailing list