Perl Monk, Perl Meditation | |
PerlMonks |
Re: Suggestion: Optional Line Numbering Tag for CODEby knobunc (Pilgrim) |
on Apr 25, 2001 at 19:07 UTC ( [id://75483]=note: print w/replies, xml ) | Need Help?? |
Yery cool idea. It would also be nice to be able to have code numbering continue from one block to the next (obviously under some user control). For example:
Then some descriptive narrative explaining what is going on. And I pick up from where I left off:
Of course sometimes you want the first block and the second to be numbered separately, and you may want to interweave one set of numbers with another. So I would propose amending the syntax to be:
All three attributes are optional. Each named section would have a running counter. The start_line attribute allows you to specify the starting line number of the section. Finally, the order attribute governs the order of the section in the resulting code. The order attribute allows you to talk about a chunk of code that is deep in the body then talk about the stuff that appears before it and have the line numbers make sense. Of course this is all becoming very similar to the Literate Programming stuff, since the "download code" link should reconstruct the code blocks into the right sections and into the right order (possibly with # line statements if lines were skipped). Of course this is all very complex and tangled and vroom is probably way to busy to do something so frivolous. So how can I help? Is there a cadre of hand picked workers who help maintain the Monastery? Can I get my hands on the current source code through some CVS share and hack it in and submit patches? -ben
In Section
Perl Monks Discussion
|
|