Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

Matts (1087)

Matts
  (email not shown publicly)

I work for MessageLabs [messagelabs.com] in Toronto, ON, Canada. I write spam filters, MTA software, high performance network software, string matching algorithms, and other cool stuff mostly in Perl and C.

Journal of Matts (1087)

Wednesday September 22, 2004
10:06 AM

multiline comments

[ #21003 ]

Seen on IRC:

=for comment =end is fine for me

Except that doesn't do what you think it does. =for is a single line formatting marker in pod, so it only marks whatever comes on the same line as the =for as a "comment" (ok, so since it's POD, it also includes anything on following lines as long as there's no blank lines following).

So a common scenario might be:

=for comment
 
This is a multiline comment.
 
Ignore this section of stuff.
 
=end

However a POD processor sees that as one line of "comment" stuff, and two lines of ordinary POD documentation paragraphs. Yes - the POD processor turns your commented out section as documentation.

I'm sure this is not what people want or intend.

What's the fix? This is what =begin/=end is for!

=begin comment
 
This is a multiline comment
 
Ignore this
 
=end

Run both under a modern POD (pre)processor and you should be able to see the difference.

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.