in reply to Is it safe/recommended to use pairs of =cut for multi line comments?
For something that I expect to "live" as part of the code, I sometimes do this:
use constant DEBUG => 0; if (DEBUG){ # block is optimized away at compile time .... # but I can turn in "on" again easily } # very readable and effective
I felt pairs of "=cut" is easier to remember than "=pod" or "=begin/end comment"There is really only one thing to remember, "=cut", ends that section. You don't have to use =pod to start, use anything that you want. I think you have a confusing mess if you use =cut to start a pod block although that does work, despite the documentation to the contrary. For debugging, I guess anything goes, but I believe it unwise to go against the documentation because a someday Perl might actually wind up doing what the documentation says!
Your question is more of "how do I disable code" rather than permanent multi-line textual comments which I think is a different subject.
|
|---|