Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

At last, block comments in Perl 5.6 !

by John M. Dlugosz (Monsignor)
on Nov 18, 2002 at 21:18 UTC ( [id://213916]=perlmeditation: print w/replies, xml ) Need Help??

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 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 jryan (Vicar) on Nov 18, 2002 at 21:47 UTC
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

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlmeditation [id://213916]
Approved by mikeirw
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others studying the Monastery: (4)
As of 2025-12-14 22:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What's your view on AI coding assistants?





    Results (95 votes). Check out past polls.

    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.