jkeenan1 has asked for the wisdom of the Perl Monks concerning the following question:
For the first time in many years of writing POD, I need to place data in =begin ... =end blocks, then extract it for use in a separate program. I seek the advice of the monks on how to do this most expeditiously.
The files into which I need to place these blocks may already have some POD, but mostly do not. My immediate need is to be able to add chunks of JSON or YAML at various points in the file -- chunks which a special POD-parsing program will extract as a list of JSON/YAML chunks for further processing. Example:
For my purpose, I only need to extract the JSON/YAML chunks. The regular POD will be handled by Pod::Text or Pod::Perldoc.Normal text paragraph. =begin specialdoc [Chunk of JSON or YAML] =end specialdoc More regular text. =begin specialdoc [2nd Chunk of JSON or YAML] =end specialdoc Still more regular text.
I would appreciate any pointers, including links to CPAN modules which extract data from =begin blocks.
Thank you very much.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Pod: Need to parse from =begin ... =end blocks
by tobyink (Canon) on May 29, 2013 at 07:32 UTC | |
by jkeenan1 (Deacon) on May 29, 2013 at 18:29 UTC | |
by tobyink (Canon) on May 31, 2013 at 21:12 UTC | |
|
Re: Pod: Need to parse from =begin ... =end blocks
by Anonymous Monk on May 29, 2013 at 03:50 UTC |