Barrie Slaymaker <[EMAIL PROTECTED]> writes:
> The C<=also for|begin|end> commands are shorthand having two copies of a
> section of POD (typically an example), one normal copy, and one
> delimited by C<=for> or C<=begin> ...C<=end>. This supports
> semi-literate programming techniques, allowing examples in POD to be
> extracted and tested. It does not affect normal compilation of the
> source code, though older POD parsers may emit warnings.
I'm unenthused.
I can sort of see the point, although I'd personally use a considerably
simpler approach for extracting code excerpts for testing, probably more
ad hoc. That may be a mistake on my part, and I can see why people would
want to do this in some more formal way.
I dislike the syntax; there shouldn't be a need to introduce a new
primitive. I'd much rather see this handled by increasing the power of
C<=for> and C<=begin> in some fashion, possibly as simple as teaching
translators to accept C<=for code> and C<=begin code> blocks as verbatim
blocks and having the POD munger that generates test code only grab stuff
bounded by either those markers or C<=for test>/C<=begin test> for the
setup code that shouldn't be in the documentation.
--
Russ Allbery ([EMAIL PROTECTED]) <http://www.eyrie.org/~eagle/>