Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: What is the easy way to comment out chunk of Perl Code

by thor (Priest)
on Nov 18, 2005 at 22:48 UTC ( [id://509987]=note: print w/replies, xml ) Need Help??


in reply to What is the easy way to comment out chunk of Perl Code

I typically use POD like this:
=for comment #your commented code goes here =cut
A little explanation. The "=for x" directive says that only a processor that's formatting for the x output type should heed what's in the following block. For instance, you could say "=for html" and then put some html markup in the block and it should be rendered only by programs seeking to render html. The nice thing about "=for comment" is that no one will be outputting a "comment" format...:-).

thor

Feel the white light, the light within
Be your own disciple, fan the sparks of will
For all of us waiting, your kingdom will come

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (6)
As of 2024-04-20 00:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found