Re: README.cygwin draft update
[p5sagit/p5-mst-13.2.git] / pod / perlmod.pod
index ca59e29..ddcbe47 100644 (file)
@@ -61,7 +61,8 @@ as a pattern match, a substitution, or a transliteration.
 Variables beginning with underscore used to be forced into package
 main, but we decided it was more useful for package writers to be able
 to use leading underscore to indicate private variables and method names.
-$_ is still global though.  See also
+However, variables and functions named with a single C<_>, such as
+$_ and C<sub _>, are still forced into the package C<main>.  See also
 L<perlvar/"Technical Note on the Syntax of Variable Names">.
 
 C<eval>ed strings are compiled in the package in which the eval() was
@@ -486,12 +487,14 @@ interpreter threads. These threads can be used explicitly and implicitly.
 
 Ithreads work by cloning the data tree so that no data is shared
 between different threads. These threads can be used using the 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.
-Perl after 5.7.2 has support for the C<CLONE> keyword. 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.
+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,
+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.
 
 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().