In http://slaysys.com/src/Pod-StdParser-0.001.tar.gz you should find an
experimental Pod::StdParser, with a Pod::Tests and a tweaked Pod::Parser and a
Pod::Text that's undergoing a transplant from Pod::Select to Pod::StdParser (yes,
I know, that'd break Pod::Usage).  I've disabled the Makefile install target, this
stuff's too dangerous for that.

The main reason for this is all is to test the =also_for and =also_begin...=also_end
implementation for generating test suites from tests *and examples* embedded in POD.

Brad Appleton, architect and author of Pod::Parser recommended *not* doing this
in Pod::Parser but in Pod::StdParser (I'm ambivilent on that), so that's the tack
I took here.  Several other suggestions about things that could be factored up to
a Pod::StdParser resulted in me grabbing some of Russ Allbery's code from Pod::Text
and adding a bunch of warnings, etc to Pod::StdParser.  More should be done on those
fronts.

The resulting minor rash of featuritus results in (so far):

- Implementation of =also_for, =also_begin...=also_end by passing the paragraphs
  through as normal text, then again as =for or =begin...=end sequences.
- Whining on malformed POD (There's a few whines I need to implement yet)
- Dispatching of =head1, etc., to $self->cmd_head1(), etc (stolen from Russ's
  Pod::Text; I plan to steal dispatching of E<> to $self->seq_e(), too).
- Automatic conversion of =for and =begin...=end-enclosed paragraphs to textblock()
  or verbatim() the =for or =begin tag matches a term or Regex passed to
  $self->for_match().
- $self->warn() to automatically put the line number on a message
- $self->over_count() and $self->over_depth() to provide =over nesting level and
  accumulated indent value.  Should rename the latter to $self->over_indent(), I think.
- $self->for_tag() to return the tag matched by $self->for_match(), makes it easy
  to tell what matched, or if textblock()/verbatim() are being called in a =for
  or =begin...=end section (but not which kind of section, yet: I'll probably add
  an $self->begin_tag for that).
- A quick and dirty test suite that minimally excercises the above.

I'm kicking this in to patch & discuss mode for now, pending next shipment of
tuits and a general agreement that any of this is worthwhile.

Yours in early releases.

Barrie

Reply via email to