Gtk2::Ex::PodViewer::Parser(3pm)

Gtk2::Ex::PodViewer::Parser3pm

A custom pod parser for gtk2::ex::podviewer.

Usage

        $Gtk2::Ex::PodViewer::Parser::LINK_TEXT_TEMPLATE = '{section} in the {document} manpage';
        my $parser = Gtk2::Ex::PodViewer::Parser->new(
                buffer  => $Gtk2TextView->get_buffer,
        );
        $parser->parse_from_file($file);

Overview

Gtk2::Ex::PodViewer::Parser is a custom Pod parser for the Gtk2::Ex::PodViewer widget. You should never need to use it directly.

It is based on Pod::Parser.

Methods

One neat method not implemented by Pod::Parser is

        $parser->parse_from_string($string);

This parses a scalar containing POD data, using IO::Scalar to create a tied filehandle.

Importable functions

        use Gtk2::Ex::PodViewer::Parser qw(decode_entities);
        my $text = decode_entities($pod);

This function takes a string of POD, and returns it with all the POD entities (eg "E<gt>" => ">") decoded into readable characters.

Variables

The $LINK_TEXT_TEMPLATE class variable contains a string that is used to generate link text for POD links for the form

        LE<lt>foo/barE<gt>

This string is run through the "gettext()" function from Locale::gettext (if installed) before it is used, so if your application supports internationalisation, then the string will be translated if it appears in your translation domain. It contains two tokens, "{section}" and "{document}", that are replaced with "foo" and "bar" respectively.

Releases

6 releases since Debian 4.0 (Etch); the text changed 2 times.

  1. 4.0
  2. 5.0
  3. 6.0–9

Authors

Gavin Brown, Torsten Schoenfeld and Scott Arrington.

From libgtk2-ex-podviewer-perl 0.18-1 in Debian 9 (Stretch). Parsed by carta from the page's man source.