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

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.
  • people who commented things out by putting #s at the absolute beginning of lines might accidentally create embedded comments by placing their # next to a curly brace or a parenthesis or a bracket. [...] I've now learned to put ## at the beginning of lines I want to comment out instead of just #.

    Is it too late to spec this in S02 the other way around? Let single # be used for commenting out, no matter what follows. Let ## (perhaps also ### and so on) switch on the special behaviour of brackets etc.

    The rati

    • Hmm, a row of hashes, optionally followed by other text, is often used for a separator, so there is still some potential for getting "special" meaning where none was intended if multi-hash is changed to mean "special" handling.

      How about making the special codes a bit harder to get by accident?  Something like #{#  ... #}# - with no whitespace permitted between the braces and the enclosing hashes - for a block delimited comment, perhaps.  That would only be an accidental hazard for people who put a comment in their block header without any whitespace and then try to comment out the line by prepending a hash again without any whitespace.  (My normal practice for commenting out lines is to prepend '# ' - the space after the hash makes it easier to still read the commented out code for when you're decided whether it is time to restore it.  So, I'm not personally liable to get hit by the current spec since I'll comment '{' as '# {' rather than '#{'.)