in reply to POD from code?
If I really want to do something like this, I do it the other way around, and create my data (not code) from POD:
my %stuff = map { /^=item * (\w+) => (.*)/ ? $1 => $2 : die "Malformed + line: $_" } grep /^=item */, split /\r?\n/, <<'=cut'; =over 4 =item * foo => ... =item * bar => ... =item * baz => ... =back =cut
Usually I find that approach to be a bit too much magic, but at least for the definition of configuration file entries, I found it helpfull as it forces me to write the documentation for every possible option together with its introduction into the program.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: POD from code?
by JavaFan (Canon) on Nov 03, 2010 at 10:32 UTC | |
|
Re^2: POD from code?
by LanX (Saint) on Nov 03, 2010 at 11:58 UTC | |
|
Re^2: POD from code?
by dgaramond2 (Monk) on Nov 03, 2010 at 22:15 UTC |