David Landgren wrote:
So again I ask, is there nobody doing text substitutions/macro
expansions on pm files on their way from the source directory to the
./blib/lib directory? It seems to me to be a useful technique, and I am
surprised that nobody (is/admits to) using it.
Yes, sort of, via a .PL file that generates the .pm in lib/ on the fly.
See Pod-Wikidoc on CPAN for an example: Pod_WikiDoc_Parser.pm.PL
It adds documentation, including a copy of the original grammar, onto a
precompiled Parse::RecDescent parser. (And then later Pod::WikiDoc
compiles the Pod from the .pm files to .pod files, but that's a separate
action during distribution generation.)
Regards,
David