in reply to globalization sorrows

Watching the CB I feel that what you are after is a Singleton. You can derive from Class::Singleton or just as easily roll your own.

package Mold; our $Singleton; sub new { return $Singleton if defined $Singleton; my $class=shift; $Singleton=bless{},$class; $Singleton->init(@_); return $Singleton; } ... 1;

Now all you have to do to get the same Mold object every time anywhere is to say Mold->new().

This is not an uncommon pattern, and is conceptually identical to a global var, except that it gives you an interface isolation layer that makes your code much easier to maintain.


---
demerphq

<Elian> And I do take a kind of perverse pleasure in having an OO assembly language...