The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

Wx::Perl::PodRichText::SimpleParser -- parser for PodRichText

DESCRIPTION

This is an internal part of Wx::Perl::PodRichText, not meant for outside use.

The parser is a Pod::Simple sub-class writing to a given target RichTextCtrl. Exactly how much it does versus how much it leaves to PodRichText is not settled, but perhaps in the future it might be possible to parse into any RichTextCtrl or RichTextBuffer.

Pod::Simple start/end handler calls generate calls to the RichText BeginBold(), EndBold(), etc, or BeginLeftIndent() and EndLeftIndent() etc for paragraphs, etc. RichText indentation is an amount in millimetres and the current code makes a value which is about two "em"s of the default font.

Other Ways to Do It

Pod::Parser is also good for breaking up POD, in combination with Pod::Escape and Pod::ParseLink. It's used by Wx::Perl::PodEditor (in Wx::Perl::PodEditor::PodParser).

An advantage of Pod::Simple is that its parse_lines() allows the main loop to push a few lines at a time into the parse to process a big document piec-by-piece. There's no reason Pod::Parser couldn't do the same but as of its version 1.37 it doesn't.

SEE ALSO

Pod::Simple, Wx, Wx::Perl::PodRichText

Wx::Perl::PodEditor::PodParser

HOME PAGE

http://user42.tuxfamily.org/wx-perl-podbrowser/index.html

LICENSE

Copyright 2012, 2013 Kevin Ryde

Wx-Perl-PodBrowser is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, or (at your option) any later version.

Wx-Perl-PodBrowser is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with Wx-Perl-PodBrowser. If not, see http://www.gnu.org/licenses/.