Don't you love it when something written as a joke actually proves useful for something?

I came across the ACME::Don't module.

It is used exactly like the do BLOCK function except that, instead of executing the block it controls, it...well...doesn't. It seems to me that you can use this to comment-out parts of code. When debugging, I sometimes knock out parts until the problem goes away.

I realize it's not as general as lexer comments, but still, it's interesting.

Replies are listed 'Best First'.
Re: At last, block comments in Perl 5.6 !
by rob_au (Abbot) on Nov 18, 2002 at 21:59 UTC
    This module has been out for some time and has even been reviewed on this site here. As it is however, for block commenting, I find either the =pod / =cut POD syntax or the Acme::Comment module referenced by jryan above to be far more flexible - Also see the perl.com article on Acme::Comment here.

    There has even been a thread specifically on this topic here.

     

    perl -e 'print+unpack("N",pack("B32","00000000000000000000000111100101")),"\n"'

Re: At last, block comments in Perl 5.6 !
by jryan (Vicar) on Nov 18, 2002 at 21:47 UTC
Re: At last, block comments in Perl 5.6 !
by princepawn (Parson) on Nov 18, 2002 at 21:34 UTC
    =head1 CODE TO IGNORE() =cut
    is my favorite technique.

    Carter's compass: I know I'm on the right track when by deleting something, I'm adding functionality

      I use=comment.

      This new technique can do it without adding 4 blank lines as well as two control lines. In fact, it doesn't care about whitespace.

Re: At last, block comments in Perl 5.6 !
by Juerd (Abbot) on Nov 19, 2002 at 23:50 UTC
Re: At last, block comments in Perl 5.6 !
by Aristotle (Chancellor) on Nov 20, 2002 at 00:24 UTC