diff options
author | Nicholas Clark <nick@ccl4.org> | 2004-07-08 13:10:35 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2004-07-08 13:10:35 +0000 |
commit | 2ec437a55932d37d12cb1720ef3c3c09f7995576 (patch) | |
tree | c1cf82f9bfb82d79f6ddd561c4443f6f61eedfa7 | |
parent | d9835d7bf59fcc9440cd048087dd1aca56d11458 (diff) | |
download | perl-2ec437a55932d37d12cb1720ef3c3c09f7995576.tar.gz |
Integrate:
[ 23062]
First stab at explaining that CLONE may get more parameters in future.
More eloquent rewording desired. Patches welcome.
[ 23065]
Randal notes:
"perldoc perldelta" still says 5.8.3 to 5.8.4, even though there
*is* a "perldoc perl583delta" properly.
This is because perl584delta still thinks it's the perldelta
p4raw-link: @23065 on //depot/perl: 5b304f34b36893c60dc4bd13dac6eee82bfce4c6
p4raw-link: @23062 on //depot/perl: 38e4e52d5683a57a270cdfb0cd26315320d2b453
p4raw-id: //depot/maint-5.8/perl@23066
p4raw-integrated: from //depot/perl@23064 'copy in' pod/perlmod.pod
(@21832..) pod/perl584delta.pod (@22736..)
-rw-r--r-- | pod/perl584delta.pod | 2 | ||||
-rw-r--r-- | pod/perlmod.pod | 11 |
2 files changed, 8 insertions, 5 deletions
diff --git a/pod/perl584delta.pod b/pod/perl584delta.pod index 87ebeb8a10..b2cdcc6b82 100644 --- a/pod/perl584delta.pod +++ b/pod/perl584delta.pod @@ -1,6 +1,6 @@ =head1 NAME -perldelta - what is new for perl v5.8.4 +perl584delta - what is new for perl v5.8.4 =head1 DESCRIPTION diff --git a/pod/perlmod.pod b/pod/perlmod.pod index 752d1f3a19..00cc71ac5a 100644 --- a/pod/perlmod.pod +++ b/pod/perlmod.pod @@ -539,11 +539,14 @@ 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> -special subroutine . In C<CLONE> you can do whatever you need to do, +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 executed once for every package that has it defined -(or inherits it). It will be called in the context of the new thread, -so all modifications are made in the new area. +C<CLONE> will be called once as a class method for every package that has it +defined (or inherits it). It will be called in the context of the new thread, +so all modifications are made in the new area. Currently CLONE is called with +no parameters other than the invocant package name, but code should not assume +that this will remain unchanged, as it is likely that in future extra parameters +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(). |