A custom pod parser for gtk2::ex::podviewer.
$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);
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.
One neat method not implemented by Pod::Parser is
$parser->parse_from_string($string);
This parses a scalar containing \s-1POD\s0 data, using IO::Scalar to create a tied filehandle.
use Gtk2::Ex::PodViewer::Parser qw(decode_entities); my $text = decode_entities($pod);
This function takes a string of \s-1POD\s0, and returns it with all the \s-1POD\s0 entities (eg \*(C`E<gt>\*(C' => \*(L">\*(R") decoded into readable characters.
The $LINK_TEXT_TEMPLATE class variable contains a string that is used to generate link text for \s-1POD\s0 links for the form
LE<lt>foo/barE<gt>
This string is run through the \*(C`gettext()\*(C' 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, \*(C`{section}\*(C' and \*(C`{document}\*(C', that are replaced with \*(C`foo\*(C' and \*(C`bar\*(C' respectively.
Gtk2::Ex::PodViewer
Pod::Parser
Locale::gettext
Gavin Brown, Torsten Schoenfeld and Scott Arrington.
(c) 2003-2005 Gavin Brown ([email protected]). All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.