It would be nice if I could designate some snippets to become both code and pod. For example, I may want to define a syntax for a parser in my perl program,
my %syntax = {
beginning => qw( keywords ),
center => qw( code text musings music ),
end => qw( goodbye )
}
I would want my pod readers to see this to understand the syntax that my parser program allows. alas, this means that I have to maintain two versions: the one in the pod and the identical one in the code--and hope I don't forget to update both appropriately.
it would be great if we had a mechanism that would allow me to tell pod that the following code snippet should make it into the pod formatted output, too.
A more ambitious (and probably to be rejected) suggestion would be to allow me to label a block, and insert it somewhere else. This way, I could define a section
=head1 SUBROUTINES =insertrefs allsubs
Now I can keep my subroutine documentation with the subroutines themselves (something like
=labelfor allsubs =head2 my function ...
the pod formatter would simply take all subroutine documentation and insert the snippets sequentially where the =insertref allsubs appeared.
of course, maybe I missed it and these two are already possible.
regards, /iaw
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: pod6 --- code+pod suggestion
by rodion (Chaplain) on Dec 17, 2006 at 23:38 UTC | |
|
Re: pod6 --- code+pod suggestion
by jdporter (Paladin) on Dec 18, 2006 at 17:19 UTC | |
by Eimi Metamorphoumai (Deacon) on Dec 19, 2006 at 15:59 UTC | |
by jdporter (Paladin) on Dec 19, 2006 at 17:27 UTC | |
|
Re: pod6 --- code+pod suggestion
by Errto (Vicar) on Dec 29, 2006 at 22:47 UTC |