=head1 DESCRIPTION
+=head2 Is this the document you were after?
+
+There are other documents which might contain the information that you're
+looking for:
+
+=over 2
+
+=item This doc
+
+Perl's packages, namespaces, and some info on classes.
+
+=item L<perlnewmod>
+
+Tutorial on making a new module.
+
+=item L<perlmodstyle>
+
+Best practices for making a new module.
+
+=back
+
=head2 Packages
X<package> X<namespace> X<variable, global> X<global variable> X<global>
sub identify_typeglob {
my $glob = shift;
- print 'You gave me ', *{$glob}{PACKAGE}, '::', *{$glob}{NAME}, "\n";
+ print 'You gave me ', *{$glob}{PACKAGE},
+ '::', *{$glob}{NAME}, "\n";
}
identify_typeglob *foo;
identify_typeglob *bar::baz;
}
INIT { print " 9. You'll see the difference right away.\n" }
- print "13. It merely _looks_ like it should be confusing.\n";
+ print "13. It only _looks_ like it should be confusing.\n";
__END__
X<module, threadsafe> X<module, thread safe>
X<CLONE> X<CLONE_SKIP> X<thread> X<threads> X<ithread>
-Since 5.6.0, Perl has had support for a new type of threads called
-interpreter threads (ithreads). These threads can be used explicitly
-and implicitly.
+Perl supports a type of threads called interpreter threads (ithreads).
+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 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>
+be cloned automatically. Perl after 5.8.0 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.