On Thu, Apr 07, 2005 at 10:21:51AM -0400, Stas Bekman wrote:
> Nicholas Clark wrote:
> >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.

For the specific case of mod_perl, would it be more useful / efficient
instead to have a C-level hook; eg register a C-level function to be
called each time an object is cloned? Or perhaps have a new 'clone' magic
type that can be attached to an SV which points to a cloning callback
function ???

Stas, I don't know what specific activity you need to carry out during
cloning, so I'm just vaguely hand-waving here. In particular I don't know
whether you need to call Perl or C code.

Anyway, I've got some spare time at the moment, so I might be volunteering
to take this on (assuming we can all agree on the interface !)

-- 
Counsellor Troi states something other than the blindingly obvious.
    -- Things That Never Happen in "Star Trek" #16

Reply via email to