Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: [literate programming] How to mix POD with code? And how to fold this?

by ssandv (Hermit)
on May 04, 2010 at 17:40 UTC ( [id://838353]=note: print w/replies, xml ) Need Help??


in reply to [literate programming] How to mix POD with code? And how to fold this?

Don't. It makes the code hard to read. Perl has a perfectly good # character for putting comments in code.

  • Comment on Re: [literate programming] How to mix POD with code? And how to fold this?

Replies are listed 'Best First'.
Re^2: [literate programming] How to mix POD with code? And how to fold this?
by LanX (Saint) on May 04, 2010 at 22:11 UTC
    > Perl has a perfectly good # character for putting comments in code.

    And how do you create POD compatible documentation from these #-comments?

    Cheers Rolf

      You don't. You put the pod at the beginning or the end, where it belongs. Code comments should make sense when you have the code in front of you. If you can make pod from them, they're overwritten, and all they're doing is reducing your ability to see the code by shoving it out of the way. Pod is for a level of documentation that makes sense when you're not staring at the code. It's not dual-sourcing because it's not the same information.

        Did I mention folding? Hmm it's even in the title...

        I prefer folding, it's robust and easy compared to the alternative to realize fancy navigation features to jump from code to corresponding POD and vice versa.

        Cheers Rolf

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others cooling their heels in the Monastery: (4)
As of 2024-04-20 14:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found