Steve Bertrand <[email protected]> asked:
> Can anyone suggest a perldoc or recommended practise that will help me
> in regards to:
> 
> I have numerous classes, all suited to a different object-type or
> function.
> 
> When I instantiate an object (all classes are under the same Module::
> umbrella), I *think* what I want to do is create an 'error' object, but
> I want that _specific_ instance of the Error object carried along with
> ALL objects created during the time the life-cycle is in operation.

You could use Class::Singleton [1] as a parent of your error handling class. 
That way, you can instantiate your error handling object in each of your 
classes in any order you like, and it'll always be the same object.

HTH,
Thomas

[1] http://search.cpan.org/~abw/Class-Singleton-1.4/lib/Class/Singleton.pm

--
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
http://learn.perl.org/


Reply via email to