Text::...::None(3pm)

πŸ“¦
version 0.41 Β· 3 versions
, in ubuntu resolute, ubuntu stonking

πŸ’… Text::...::None(3pm) β€” the manual page, but make it cute

okay bestie, so this is a page from the User Contributed Perl Documentation set, and it's all about Text::Markup::None. it's a tiny little module with main character energy and honestly? it does one job and it does it flawlessly. no cap. πŸŽ€


✨ Name ✨

Text::Markup::None β€” turns a file with literally no known markup into HTML πŸ¦‹


✨ Synopsis ✨

use Text::Markup;
my $html = Text::Markup->new->parse(file => 'README');
my $raw  = Text::Markup->new->parse(
    file    => 'README',
    options => [ raw => 1 ],
);

like... look at that. so clean. so demure. πŸ’–


✨ Description ✨

okay so here's the tea β˜•: this is the default parser that Text::Markup reaches for when it simply cannot figure out what format a text file is in. it's the "idk bestie, we're just gonna vibe" fallback and honestly it eats every time.

what does it actually do? literally just:

  1. reads the file in (and yeah, it's relying on a BOM β€” that's a byte order mark, the little signature that tells you the encoding β€” more deets here: https://www.unicode.org/unicode/faq/utf_bom.html#BOM),
  2. encodes all entities,
  3. hands you back an HTML string with the whole file sitting inside a <pre> element. πŸ’…

that's it. that's the whole personality. and it's so handy for files that really are nothing but plain text β€” like README files, which are famously just vibes and words.

about the file extensions, bc you're gonna ask

by default, this parser is not associated with any file extensions. none. zero. it's unbothered. unclaimed. 🌸

but if you want Text::Markup to also recognize files for this module, you just load it directly and pass it a regular expression matching whatever extension(s) you're into, like this:

use Text::Markup::None qr{te?xt};

slay. now it knows. 🫢

the skeleton thing

normally this module wraps its output in a minimal HTML document skeleton (you know, the little html/body bones so it looks like a real page). but if you'd rather have the raw output with no skeleton at all, just pass the raw option to parse. that's the whole trick. iykyk. 😌


✨ Author ✨

David E. Wheeler <david@justatheory.com> β€” king behavior, thank you for your service πŸ‘‘


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.

so basically: it's free, it's open, go wild, just keep the same terms as Perl itself. periodt. πŸ’œ

and that's the whole page, bestie!! this one's from perl v5.40.1, dated 2025-12-18, and it's filed under the manual name Text::...::None(3pm) in the User Contributed Perl Documentation. mwah πŸ’‹ go read a README, it'll look gorgeous in a <pre>. 🧚✨

πŸ“¦ where this page comes from