From: Rafael Garcia-Suarez Date: Tue, 23 Sep 2003 22:09:57 +0000 (+0000) Subject: The FAQ answer about POD comments was incorrect. [perl #23893] X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=659cfd94ba23a1b903a75ecaffde534106f93c22;p=p5sagit%2Fp5-mst-13.2.git The FAQ answer about POD comments was incorrect. [perl #23893] (plus a few typos.) p4raw-id: //depot/perl@21349 --- diff --git a/pod/perlfaq7.pod b/pod/perlfaq7.pod index a735edc..96d6b88 100644 --- a/pod/perlfaq7.pod +++ b/pod/perlfaq7.pod @@ -725,32 +725,27 @@ not necessarily the same as the one in which you were compiled): =head2 How can I comment out a large block of perl code? -You can use embedded POD to discard it. The =for directive -lasts until the next paragraph (two consecutive newlines). +You can use embedded POD to discard it. Enclose the blocks you want +to comment out in POD markers, for example C<=for nobody> and C<=cut> +(which marks ends of POD blocks). # program is here =for nobody - This paragraph is commented out - - # program continues - -The =begin and =end directives can contain multiple -paragraphs. - - =begin comment text all of this stuff here will be ignored by everyone - =end comment text + =cut + + # program continues The pod directives cannot go just anywhere. You must put a pod directive where the parser is expecting a new statement, not just in the middle of an expression or some other -arbitrary s grammar production. +arbitrary grammar production. See L for more details. diff --git a/pod/perlpodspec.pod b/pod/perlpodspec.pod index e42bd4f..40e5371 100644 --- a/pod/perlpodspec.pod +++ b/pod/perlpodspec.pod @@ -238,7 +238,7 @@ ignored. Examples: # This is the first line of program text. sub foo { # This is the second. -It is an error to try to I a Pod black with a "=cut" command. In +It is an error to try to I a Pod block with a "=cut" command. In that case, the Pod processor must halt parsing of the input file, and must by default emit a warning.