X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=pod%2Fperlfunc.pod;h=fcd6f57ef10564126e1d1275649d77b61e7fd818;hb=5269aecde866056a77e32c937c7c3182bb599487;hp=67c305ca6bc727253bc0356ea0caa9f30e1e8194;hpb=d4679214791076d9237514d11f1157d01518d06f;p=p5sagit%2Fp5-mst-13.2.git diff --git a/pod/perlfunc.pod b/pod/perlfunc.pod index 67c305c..fcd6f57 100644 --- a/pod/perlfunc.pod +++ b/pod/perlfunc.pod @@ -3000,7 +3000,7 @@ with it. B: This is an experimental feature that may be changed or removed in future releases of Perl. It should not be relied upon. -The only currently recognized attribute is C which indicates +The only currently recognized attribute is C which indicates that a single copy of the global is to be used by all interpreters should the program happen to be running in a multi-interpreter environment. (The default behaviour would be for each interpreter to @@ -3008,13 +3008,13 @@ have its own copy of the global.) In such an environment, this attribute also has the effect of making the global readonly. Examples: - our @EXPORT : shared = qw(foo); - our %EXPORT_TAGS : shared = (bar => [qw(aa bb cc)]); - our $VERSION : shared = "1.00"; + our @EXPORT : unique = qw(foo); + our %EXPORT_TAGS : unique = (bar => [qw(aa bb cc)]); + our $VERSION : unique = "1.00"; Multi-interpreter environments can come to being either through the fork() emulation on Windows platforms, or by embedding perl in a -multi-threaded application. The C attribute does nothing in +multi-threaded application. The C attribute does nothing in all other environments. =item pack TEMPLATE,LIST @@ -3404,8 +3404,10 @@ C<$::sail> is equivalent to C<$main::sail> (as well as to C<$main'sail>, still seen in older code). If NAMESPACE is omitted, then there is no current package, and all -identifiers must be fully qualified or lexicals. This is stricter -than C, since it also extends to function names. +identifiers must be fully qualified or lexicals. However, you are +strongly advised not to make use of this feature. Its use can cause +unexpected behaviour, even crashing some versions of Perl. It is +deprecated, and will be removed from a future release. See L for more information about packages, modules, and classes. See L for other scoping issues. @@ -4066,14 +4068,14 @@ documentation. =item semop KEY,OPSTRING Calls the System V IPC function semop to perform semaphore operations -such as signaling and waiting. OPSTRING must be a packed array of +such as signalling and waiting. OPSTRING must be a packed array of semop structures. Each semop structure can be generated with -C. The number of semaphore +C. The number of semaphore operations is implied by the length of OPSTRING. Returns true if successful, or false if there is an error. As an example, the following code waits on semaphore $semnum of semaphore id $semid: - $semop = pack("sss", $semnum, -1, 0); + $semop = pack("s!3", $semnum, -1, 0); die "Semaphore trouble: $!\n" unless semop($semid, $semop); To signal the semaphore, replace C<-1> with C<1>. See also @@ -5335,6 +5337,8 @@ seconds, for this process and the children of this process. ($user,$system,$cuser,$csystem) = times; +In scalar context, C returns C<$user>. + =item tr/// The transliteration operator. Same as C. See L.