theory/pod-simple — pull request #28 by gisle (2012-05-04 07:56:42+00:00)
Title: Add handle_code as overrideable method on Pod::Simple::XHTML

For ActivePerl we plug in a syntax highlighter for the code snippets in the generated HTML documentation. In order to support this for perl-5.16 I ended up patching Pod::Simple::XHTML to introduce handle_code as a method that by default just wrapps its content in `...`.

We will then subclass Pod::Simple::XHTML to invoke our syntax highlighter in an overridden handle_code method.

For this to work without much hassle I also found that I needed to add code to join subsequent text segments so that they were all processed by a single _handle_text invocation. This lead to some ugliness in the corpus.t tests, so I also replaced the line-wrapper used by Pod::Simple::DumpAsXML with Text::Wrap for more readable diffs. Text::Wrap is already a prereq module for Pod-Simple.