Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re^3: Multi-line comments in perl code?

by haukex (Archbishop)
on Apr 03, 2020 at 06:53 UTC ( [id://11114974]=note: print w/replies, xml ) Need Help??


in reply to Re^2: Multi-line comments in perl code?
in thread Multi-line comments in perl code?

=for comment Comment! =cut
... produces:
SECTION Comment!

That is the correct behavior, your conclusion "=for comment hides text from perl but not perldoc" isn't correct. From perlpod (emphasis mine):

The command "=for formatname text..." specifies that the remainder of just this paragraph (starting right after formatname) is in that special format.

Remove the blank line after the =for and the "Comment!" is hidden. The =for still begins a section of POD that needs to be terminated by =cut, so Perl will ignore the entire example you posted.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (4)
As of 2024-04-25 12:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found