BTW another solution that comes to mind is to use a flyweight pattern for your objects. That puts all of your current objects into a convenient hash that you can iterate through in an END block to do cleanup. Doing things that way gives you 2 wins. Better encapsulation, and it solves the global destruction problem in a way that is more likely to work across versions of Perl.
|Replies are listed 'Best First'.|
(tye)Re: Tie & Destroy, OOP
by tye (Sage) on Aug 10, 2001 at 01:05 UTC