Elizabeth Mattijsen <[EMAIL PROTECTED]> writes: > At 04:03 AM 7/23/02 +1000, Ken Williams wrote: > >> return unless ref($_[0]); > >I usually just call UNIVERSAL::isa($_[0], 'your::class::name') in these cases. > > That's a good tip. > > I actually generalized this to: > > return unless UNIVERSAL::isa( $_[0],__PACKAGE__ ); > > This will be implemented in Thread::Pool 0.17... ;-)
Don't you still have a 'subclass problem? Consider some parent class with children A,B,C & D. If a 'D' gets DESTROYed correctly at first and then a subsequent spurious DESTROY passes an object that's morphed into a 'C' then you're protection is stuffed. -- Piers "It is a truth universally acknowledged that a language in possession of a rich syntax must be in need of a rewrite." -- Jane Austen?