Gtk2::E...::Parser(3)

πŸ“¦
version 0.18 Β· 2 versions
, in fedora 43

πŸ’– 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::PodViewer
  • Pod::Parser
  • Locale::gettext

πŸ‘‘ AUTHORS πŸ‘‘

Gavin Brown, Torsten Schoenfeld and Scott Arrington. the whole squad fr fr 🫢


(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