diff options
author | Offer Kaye <offer.kaye@gmail.com> | 2005-06-02 12:14:53 +0300 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2005-06-13 12:49:18 +0000 |
commit | 4d5ff0dd951920bb2d1547bff31c06ec7201d40a (patch) | |
tree | a41ec422736a02cbbc5d661215f21b44b92b29dd /pod/perlmod.pod | |
parent | 5b84a3d896084790d6638ccb9090937d461baad4 (diff) | |
download | perl-4d5ff0dd951920bb2d1547bff31c06ec7201d40a.tar.gz |
Re: [perl #36047] perlmod.pod/CLONESKIP error
Message-ID: <56942505060123146e5eb1c2@mail.gmail.com>
p4raw-id: //depot/perl@24822
Diffstat (limited to 'pod/perlmod.pod')
-rw-r--r-- | pod/perlmod.pod | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/pod/perlmod.pod b/pod/perlmod.pod index 518c04bf19..99d08eb4f8 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<threads> 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<CLONE> -and C<CLONE_SKIP> special subroutines. In C<CLONE> you can do whatever +special subroutine. In C<CLONE> you can do whatever you need to do, like for example handle the cloning of non-Perl data, if necessary. C<CLONE> 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<CLONE_SKIP> special subroutine. Like C<CLONE>, C<CLONE_SKIP> 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 |