Pod::Simple filtering like Pod::Select
[email protected] (Graham Knop) Tue, 12 Sep 2023 13:51:52 -0600
| Newsgroups | perl.pod-people |
|---|---|
| Message-ID | <CAM=m89FAmuL8e1Edn-DswoZrTdxpc86mUn5Nbm-QOwtUxw9BdA@mail.gmail.com> |
--000000000000ecd42606052ec6ca Content-Type: text/plain; charset="UTF-8" One important feature that exists in Pod::Parser that doesn't in Pod::Simple is an easy way to filter its output by section. While this can be implemented by a specific formatter, that isn't great. When Pod::Usage was ported to Pod::Simple, it added a rudimentary filter mechanism for its own output, but that isn't reusable. I've written an implementation of this for Pod::Simple: https://github.com/perl-pod/pod-simple/pull/154. This is meant to be usable by all subclasses without any extra work. It is a bit invasive, as it changes when the _handle_element_start, _handle_element_end, and _handle_text methods are called. And I'm not certain about the interface for setting up filters. I wanted at least to be able to support Pod::Select filters unchanged, but it doesn't need to be limited to that. I would appreciate any feedback. --000000000000ecd42606052ec6ca Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"auto"><div dir=3D"auto">One important feature that exists in Po= d::Parser that doesn't in Pod::Simple is an easy way to filter its outp= ut by section. While this can be implemented by a specific formatter, that = isn't great. When Pod::Usage was ported to Pod::Simple, it added a rudi= mentary filter mechanism for its own output, but that isn't reusable.</= div><div dir=3D"auto"><br></div><div dir=3D"auto">I've written an imple= mentation of this for Pod::Simple: <a href=3D"https://github.com/perl-pod/p= od-simple/pull/154">https://github.com/perl-pod/pod-simple/pull/154</a>. Th= is is meant to be usable by all subclasses without any extra work. It is a = bit invasive, as it changes when the _handle_element_start, _handle_element= _end, and _handle_text methods are called. And I'm not certain about th= e interface for setting up filters. I wanted at least to be able to support= Pod::Select filters unchanged, but it doesn't need to be limited to th= at.</div><div dir=3D"auto"><br></div><div dir=3D"auto">I would appreciate a= ny feedback.</div></div> --000000000000ecd42606052ec6ca--