Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re^2: Creating tutorial POD that refers to source code lines

by perlancar (Friar)
on Jan 22, 2019 at 10:16 UTC ( #1228805=note: print w/replies, xml ) Need Help??


in reply to Re: Creating tutorial POD that refers to source code lines
in thread Creating tutorial POD that refers to source code lines

Personally I'd say something like "the full source code for the script discussed in this tutorial can be found in Appendix A" near the start, and give the full source code within the pod. Then during the tutorial, when you need to refer to particular sections of the source code, instead of just saying a line number, quote a few lines of code the part under discussion and any extra lines necessary to understand it in context. If this is more than four lines, perhaps add some comments like ##line 18 so that readers can find their way around it.

Thanks, a couple of good ideas to adopt. A bit more work, but still workable.

You may also want to include the full script as a standalone file outside of the pod, but don't rely on this as the only way to provide it, as examples aren't typically installed.

That's okay. Example scripts that aren't installed are still readable and downloadable via MetaCPAN.

  • Comment on Re^2: Creating tutorial POD that refers to source code lines

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (2)
As of 2021-04-11 12:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?