From 4d5ff0dd951920bb2d1547bff31c06ec7201d40a Mon Sep 17 00:00:00 2001 From: Offer Kaye Date: Thu, 2 Jun 2005 12:14:53 +0300 Subject: [PATCH] Re: [perl #36047] perlmod.pod/CLONESKIP error Message-ID: <56942505060123146e5eb1c2@mail.gmail.com> p4raw-id: //depot/perl@24822 --- pod/perlmod.pod | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pod/perlmod.pod b/pod/perlmod.pod index 518c04b..99d08eb 100644 --- a/pod/perlmod.pod +++ b/pod/perlmod.pod @@ -539,7 +539,7 @@ between different threads. These threads can be used by using the C module or by doing fork() on win32 (fake fork() support). When a thread is cloned all Perl data is cloned, however non-Perl data cannot be cloned automatically. Perl after 5.7.2 has support for the C -and C special subroutines. In C you can do whatever +special subroutine. In C you can do whatever you need to do, like for example handle the cloning of non-Perl data, if necessary. C will be called once as a class method for every package that has it @@ -552,6 +552,7 @@ will be passed in to give more information about the state of cloning. If you want to CLONE all objects you will need to keep track of them per package. This is simply done using a hash and Scalar::Util::weaken(). +Perl after 5.8.7 has support for the C special subroutine. Like C, C is called once per package; however, it is called just before cloning starts, and in the context of the parent thread. If it returns a true value, then no objects of that class will -- 2.7.4