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
In reply to pod6 --- code+pod suggestion by iaw4
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |