in reply to Re: "importing" methods?
in thread "importing" methods?
No it's not a singleton, there are (<10%) cases where I need more than one object.
Otherwise I'd use a normal module.
That's why I need a mechanism for the remaining 90% to use a normal Class like a singleton module.
My interpretation:
From a Java OOP point of view Perl's module/package architecture could be understood as Singleton classes and the import routine as the constructor and package vars as class/instance variables (singleton means class=instance)
Lexical scoping of a modules effects are crucial to avoid global conflicts.
These things are hard to discuss because of little incompatibilities between languages.
Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery
FootballPerl is like chess, only without the dice
|
---|