[inseparable changes from patch from perl5.003_22 to perl5.003_23]
[p5sagit/p5-mst-13.2.git] / pod / perldiag.pod
index 68cc69d..0f204a8 100644 (file)
@@ -1716,27 +1716,49 @@ the BSD version, which takes a pid.
 
 =item Possible attempt to put comments in qw() list
 
-(W) You probably wrote something like this:
+(W) qw() lists contain items separated by whitespace; as with literal
+strings, comment characters are not ignored, but are instead treated
+as literal data.  (You may have used different delimiters than the
+exclamation marks parentheses shown here; braces are also frequently
+used.)
 
-    qw( a # a comment
+You probably wrote something like this:
+
+    @list = qw( 
+       a # a comment
         b # another comment
-      ) ;
+    );
 
 when you should have written this:
 
-    qw( a 
+    @list = qw(
+       a 
         b 
-      ) ;
+    );
+
+If you really want comments, build your list the
+old-fashioned way, with quotes and commas:
+
+    @list = (
+        'a',    # a comment
+        'b',    # another comment
+    );
 
 =item Possible attempt to separate words with commas
 
-(W) You probably wrote something like this:
+(W) qw() lists contain items separated by whitespace; therefore commas
+aren't needed to separate the items. (You may have used different
+delimiters than the parentheses shown here; braces are also frequently
+used.)
 
-    qw( a, b, c );
+You probably wrote something like this: 
 
-when you should have written this:
+    qw! a, b, c !;
+
+which puts literal commas into some of the list items.  Write it without
+commas if you don't want them to appear in your data:
 
-    qw( a b c );
+    qw! a b c !;
 
 =item Possible memory corruption: %s overflowed 3rd argument
 
@@ -2566,10 +2588,10 @@ streams, such as
     }
     close OUT;
 
-=item Got an error from DosAllocMem:
+=item Got an error from DosAllocMem
 
-(P) An error peculiar to OS/2. Most probably you use an obsolete version
-of perl, and this should not happen anyway.
+(P) An error peculiar to OS/2.  Most probably you're using an obsolete
+version of Perl, and this should not happen anyway.
 
 =item Malformed PERLLIB_PREFIX