Subject: | Conditional inclusion |
Pod::Readme provides conditional inclusion of text.
The documentation is a little hard to find, but if you install it and do a perldoc Pod::Readme it's there.
Although it claims Pod::Readme as an ancestor, ReadmeAnyFromPod doesn't provide the same facility, which is quite useful.
It would be ideal if it used the same syntax. (However, see https://github.com/bigpresh/Pod-Readme/issues for some issues :-)
The short form is
=begin :readme
text is included
=end :readme
=for readme stop
following pod goes in the doc, not the readme
=for readme continue
following pod goes in both
=for readme include file=foo type={pod,text} start=regexp end=regexp
file starting with and upto regexps (or whole file if omitted) is
(er, should be) inserted as verbatim - that is, as if each line were
POD beginning with a space.
There should (used to be) the ability to select based on readme format. That's broken in the current Pod::Readme, but something like
=begin :readme markdown
=end :readme markdown
=for readme stop format=markdown
=for readme continue format=markdown
should exist. (Why the =for version? Because it allows text common to doc and readme to be woven.
It would be great if ReadmeAnyFromPod could have feature parity with Pod::Readme.
Thanks for your consideration.