Nicholas Clark wrote: [...]
It's time to write CLONE2 which should be a method, identical to DESTROY, which should be called by perl_clone(), when it sees that the object->can('CLONE2').
Of course for backward compatibility CLONE should stay as it is now.
What do you think?
Does this differ at all in functionality from the proposal to pass an array (or arrayref) of all objects of a class as an argument to the CLONE method?
IIRC the ithreads clone code is pretty much already tracking this information.
Cool. Can we have it? Let me know if you need help working on it. I'd rather spend time improving it, than using the current CLONE. And I'd really hope to see it in 5.8.7, otherwise we won't have a perl-thread-safe mp2 until the next release.
I thought that there would be problems with subclasses that don't override the CLONE method, but there isn't - if Bar is a subclass of Foo, then Foo->CLONE([EMAIL PROTECTED]) is called for all the Foos, and Bar->CLONE([EMAIL PROTECTED]) is called for all the Bars.
Cool!
-- __________________________________________________________________ Stas Bekman JAm_pH ------> Just Another mod_perl Hacker http://stason.org/ mod_perl Guide ---> http://perl.apache.org mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com http://modperlbook.org http://apache.org http://ticketmaster.com
