Multi-line comments in Perl?

sigzero on 2006-07-30T01:33:25

In my web surfing tonight I came upon a reference to this module:

I wonder how many Perlers actually use something like this? I always thought m-line comments to be handy.

Is Perl6 going to have multi-line comments?


Perl 6 comments

david.romano on 2006-07-30T02:02:08

Thanks for the pointer to Acme::Comments! As for Perl 6, from what I have noticed there are a few ways to do multiline comments. Check out Synopsis 2.

Re:Perl 6 comments

sigzero on 2006-07-30T03:04:54

I think Perl6 should ditch # as a comment altogether. I much prefer the way OCaml does it:

(* single line *)

(*
    This is a multi-line
*)

Of course, with the Acme::Comment module I can set the comment as Bliss or Beta and get the same thing.

Re:Perl 6 comments

Aristotle on 2006-07-30T11:39:05

I think Perl6 should ditch # as a comment altogether.

Travesty.

use orz

mr_bean on 2006-07-30T02:46:55

I used to use the POD directive, 'begin comment text,' but it was a multi-line tag.

Now I use ingy's orz module. It's a source filter, but safely (?) compiled to a .pmc file.

'use orz' to start the comment. 'no orz' to end it.

orz is ascii art of a programmer brought to their knees by their code.

http://cpansearch.perl.org/user/ingy/orz/

Speaking of Acme::Comments..

Alias on 2006-07-30T04:33:17

I actually found Acme::Comments in use on my current project. Seeing Acme:: modules used live certainly threw me off for a minute.

Re:Speaking of Acme::Comments..

sigzero on 2006-07-30T11:35:31

Since they are in *use* on your current project do you use multi-line comments? Just curious...

No multi-line comments

Abigail on 2006-07-31T09:48:10

Don't use multi-line comments. If you have a piece of code that requires a multi-line comment, rewrite it so it doesn't need to many lines of comment.

Remember, the number 1 red flag for complicated code is the existence of a blob of comments.

Re:No multi-line comments

sigzero on 2006-07-31T14:10:20

Well that is no fun and I *like* multi-line comments. I am not saying what you are suggesting is wrong...just not my *preference*. I just found it cool and thought I would mention it.