perlancar has asked for the wisdom of the Perl Monks concerning the following question:
I'm planning to package some of my tutorials on my blog and upload it as CPAN distribution. Here's an example blog post. Some of these posts present a piece of source code and discuss it part by part, mentioning line number or line number ranges (BTW, as you see, WordPress shows line numbers and allows us to highlight some lines.)
MetaCPAN also has a source code viewer which shows line number and can highlight a single line (example). I'm not sure if the source code viewer can be instructed to highlight multiple lines. In my tutorial POD (converted from the tutorial blog post) I can link to a specific line. The drawback is: 1) the link is specific to MetaCPAN; 2) the source code needs to be in a separate file in the distribution. For source code embedded in the POD as verbatim paragraphs, by default there is no line number or line highlighting.
Any advice on how to make this kind of tutorial also convenient to read on MetaCPAN?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Creating tutorial POD that refers to source code lines
by tobyink (Canon) on Jan 22, 2019 at 09:15 UTC | |
by perlancar (Hermit) on Jan 22, 2019 at 10:16 UTC | |
|
Re: Creating tutorial POD that refers to source code lines
by Anonymous Monk on Jan 22, 2019 at 10:00 UTC | |
by perlancar (Hermit) on Jan 22, 2019 at 10:12 UTC | |
by Anonymous Monk on Jan 22, 2019 at 12:00 UTC | |
by perlancar (Hermit) on Jan 22, 2019 at 13:56 UTC | |
by Anonymous Monk on Jan 24, 2019 at 01:39 UTC |