another threads reliability fix: serialize writes to thr->threadsv
[p5sagit/p5-mst-13.2.git] / pod / perlguts.pod
index b835b59..38d7569 100644 (file)
@@ -95,7 +95,8 @@ or string.
 
 In the C<SvPV> macro, the length of the string returned is placed into the
 variable C<len> (this is a macro, so you do I<not> use C<&len>).  If you do not
-care what the length of the data is, use the global variable C<PL_na>.  Remember,
+care what the length of the data is, use the global variable C<PL_na>, though
+this is rather less efficient than using a local variable.  Remember,
 however, that Perl allows arbitrary strings of data that may both contain
 NULs and might not be terminated by a NUL.
 
@@ -1636,7 +1637,7 @@ the SV which holds the name of the sub being debugged.  This is the C
 variable which corresponds to Perl's $DB::sub variable.  See C<PL_DBsingle>.
 The sub name can be found by
 
-       SvPV( GvSV( PL_DBsub ), PL_na )
+       SvPV( GvSV( PL_DBsub ), len )
 
 =item PL_DBtrace
 
@@ -1856,7 +1857,8 @@ Returns the key slot of the hash entry as a C<char*> value, doing any
 necessary dereferencing of possibly C<SV*> keys.  The length of
 the string is placed in C<len> (this is a macro, so do I<not> use
 C<&len>).  If you do not care about what the length of the key is,
-you may use the global variable C<PL_na>.  Remember though, that hash
+you may use the global variable C<PL_na>, though this is rather less
+efficient than using a local variable.  Remember though, that hash
 keys in perl are free to contain embedded nulls, so using C<strlen()>
 or similar is not a good way to find the length of hash keys.
 This is very similar to the C<SvPV()> macro described elsewhere in
@@ -2179,8 +2181,9 @@ the type.  Can do overlapping moves.  See also C<Copy>.
 
 =item PL_na
 
-A variable which may be used with C<SvPV> to tell Perl to calculate the
-string length.
+A convenience variable which is typically used with C<SvPV> when one doesn't
+care about the length of the string.  It is usually more efficient to
+declare a local variable and use that instead.
 
 =item New
 
@@ -3008,8 +3011,7 @@ Checks the B<private> setting.  Use C<SvPOK>.
 =item SvPV
 
 Returns a pointer to the string in the SV, or a stringified form of the SV
-if the SV does not contain a string.  If C<len> is C<PL_na> then Perl will
-handle the length on its own.  Handles 'get' magic.
+if the SV does not contain a string.  Handles 'get' magic.
 
        char*   SvPV (SV* sv, int len )