Gtk2::E...::Parser(3)
π Gtk2::E...::Parser(3) π
User Contributed Perl Documentation β¨ Gtk2::E...::Parser(3)
okay bestie, welcome to the manual for Gtk2::Ex::PodViewer::Parser β yes the name is giving "abbreviated by someone who ran out of screen width" but we move π«Ά
β¨ NAME β¨
Gtk2::Ex::PodViewer::Parser β a custom POD Parser for Gtk2::Ex::PodViewer. that's it. that's the whole job description π
πΈ SYNOPSIS πΈ
$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);
look at that. gorgeous. iconic. builds a parser, points it at a buffer, feeds it a file πβ¨
π¦ DESCRIPTION π¦
Gtk2::Ex::PodViewer::Parser is a custom Pod parser for the Gtk2::Ex::PodViewer widget. and here's the tea, bestie: you should never need to use it directly. it's the backstage crew, not the main character. let it cook in the background π₯
It is based on Pod::Parser. so like, it inherited the family traits π
π 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. no actual file needed, she's flexible like that π
β¨
π 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. so all that crusty markup turns into actual human-legible text. we love a glow-up π§
π 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. lowkey a template engine, highkey just two lil placeholders doing their thing π
β SEE ALSO β
Gtk2::Ex::PodViewerPod::ParserLocale::gettext
π AUTHORS π
Gavin Brown, Torsten Schoenfeld and Scott Arrington. the whole squad fr fr π«Ά
πΈ COPYRIGHT πΈ
(c) 2003-2005 Gavin Brown (gavin.brown@uk.com). All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
and that's the whole page, bestie!! no cap, every flag and every token accounted for β¨
this has been perl v5.42.0, dated 2025-07-25, page Gtk2::E...::Parser(3) β slay, stay hydrated, and may your parsers never segfault πππ¦
π¦ where this page comes from
- fedora 43: perl-Gtk2-Ex-PodViewer 0.18-48.fc43 Β· GPL-1.0-or-later OR Artistic-1.0-Perl
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms