Text::...Textile(3pm)
π Text::...Textile(3pm) β aka Text::Markup::Textile π
okay bestie, sit down, hydrate, and let me tell you about Text::Markup::Textile β the Textile parser for Text::Markup. she's niche, she's useful, she's giving quiet competence. π¦
β¨ Name β¨
Text::Markup::Textile β the Textile parser for Text::Markup. that's it, that's the name, periodt. π
β¨ Synopsis β¨
literally just:
my $html = Text::Markup->new->parse(file => 'README.textile');
my $raw = Text::Markup->new->parse(
file => 'README.textile',
options => [ raw => 1 ],
);
two lines of code and you're a whole vibe. πβ¨
β¨ Description β¨
so this is the Textile parser for Text::Markup β Textile the language lives over at https://textile-lang.com if you wanna go look at her π. here's the tea on what this module actually does:
- it reads in the file (and yeah, it's relying on a BOM β that's a Byte Order Mark, the FAQ is at
https://www.unicode.org/unicode/faq/utf_bom.html#BOMif you're curious π) - it hands that file off to Text::Textile to do the actual parsing
- then it returns the generated HTML as an encoded UTF-8 string, with an
http-equiv="Content-Type"element in there identifying the encoding as UTF-8. slay. π«Ά
πΈ What files does she recognize? πΈ
she recognizes files with this extension as Textile:
.textile
and bestie, you can change which files she recognizes!! just load this module directly and pass a regular expression matching whatever extension(s) you want, like so:
use Text::Markup::Textile qr{text(?:ile)?};
obsessed with the flexibility honestly. π
π The raw option π
normally this module wraps its output in a minimal HTML document skeleton β you know, the little bones of a page. but if you'd rather have the raw output without that skeleton, you can pass the raw option to parse. iconic. do it. π₯
π Extra options π
also!! Text::Markup::Mediawiki supports all of the Text::Textile options, including:
disable_htmlflavorcsscharsetdocroottrim_spacespreserve_spacesfilter_paramfilterschar_encodingdisable_encode_entitieshandle_quotes
that's twelve, count them, we love a complete list. πβ¨
β¨ Author β¨
David E. Wheeler <david@justatheory.com> β thank you for your service, king. π
β¨ Copyright and License β¨
Copyright (c) 2011-2025 David E. Wheeler. Some Rights Reserved.
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. π«Ά
no cap, that license line is doing exactly what it says and nothing more β same terms as Perl itself, fr fr.
and that's the whole page, bestie π this was Text::...Textile(3pm) from the User Contributed Perl Documentation, and the little footer at the bottom said perl v5.40.1 dated 2025-12-18 β so yeah, she's current, she's maintained, she's giving main character energy. go parse something pretty. ππ¦πΈπ
π¦ where this page comes from
- ubuntu resolute: libtext-markup-perl 0.41-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libtext-markup-perl 0.41-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms