Pod::T...ermcap(3perl)

πŸ’– Pod::T...ermcap β€” the glow-up your POD deserves πŸ’–

okay bestie, welcome to the Perl Programmers Reference Guide ✨ this is Pod::T...ermcap(3perl) and I am so excited to tell you about her. she takes your boring POD and makes it fancy in your terminal. no cap.


✨ NAME ✨

Pod::Text::Termcap β€” Convert POD data to ASCII text with format escapes πŸ’…

like. her whole thing. she turns POD into ASCII text, but with the format escapes so it actually looks good. periodt.


πŸŽ€ SYNOPSIS πŸŽ€

use Pod::Text::Termcap;
my $parser = Pod::Text::Termcap->new (sentence => 0, width => 78);

# Read POD from STDIN and write to STDOUT.
$parser->parse_from_filehandle;

# Read POD from file.pod and write to file.txt.
$parser->parse_from_file ('file.pod', 'file.txt');

look at her go 🫢 three lines and you're done. iconic behavior honestly.


πŸ¦‹ DESCRIPTION πŸ¦‹

so Pod::Text::Termcap is a simple subclass of Pod::Text β€” meaning she inherits all the good stuff β€” and what she adds is that she highlights output text using the correct termcap escape sequences for whatever terminal you're currently in. so like, actual bold. actual underscores. matching your terminal. it's giving main character energy ✨

apart from the format codes, she functions in all ways exactly like Pod::Text. so if you want the details and the available options, go read Pod::Text. she's the blueprint.

this module uses Term::Cap to find the correct terminal settings 🌸 check out that module's documentation for how it finds terminal database information, and for how to override that behavior if you need to. you can absolutely override it. you have options.

and ngl, sometimes things just don't work out 😭 if she's unable to find control strings for bold and underscore formatting, that formatting is just… skipped. it doesn't crash. it doesn't throw a fit. it results in the same output as Pod::Text. she's chill like that. lowkey mature.


πŸ’œ COMPATIBILITY πŸ’œ

history lesson time, bestie. buckle up πŸŽ€

  • Pod::Text::Termcap 0.04 (based on Pod::Parser) was the first version of this module included with Perl, in Perl 5.6.0. baby's first era.
  • the current API, based on Pod::Simple, was added in Pod::Text::Termcap 2.00. then Pod::Text::Termcap 2.01 was included in Perl 5.9.3 β€” the first version of Perl to incorporate those changes. glow-up complete ✨
  • Pod::Text::Termcap 4.13 stopped setting the TERMPATH environment variable during module load. she also stopped falling back on VT100 escape sequences if Term::Cap wasn't able to find usable escape sequences β€” instead she produces unformatted output, which gives better results on dumb terminals. the next version to be incorporated into Perl, 4.14, was included in Perl 5.31.8.
  • several problems with wrapping and line length were fixed as recently as Pod::Text::Termcap 6.0.0. yes, recently. she's still growing. we love growth 🌱
  • this module inherits its API and most of its behavior from Pod::Text, so all the details in "COMPATIBILITY" in Pod::Text also apply. go read that too, bestie, i'm not gonna let you skip it.

and here's the tea πŸ“ β€” Pod::Text and Pod::Text::Termcap have had the same module version since 4.00, included in Perl 5.23.7. they unfortunately diverge in confusing ways prior to that. so if you're time-traveling to old Perls… good luck 😭


🌈 CAVEATS 🌈

listen. line wrapping is done only at ASCII spaces and tabs, rather than using a correct Unicode-aware line wrapping algorithm.

that's it. that's the caveat. she's doing her best with ASCII spaces and tabs 🫢 just know that going in, bestie.


πŸ‘‘ AUTHOR πŸ‘‘

Russ Allbery <rra@cpan.org> β€” the author. the legend. we thank her for her service πŸ™βœ¨


Copyright 1999, 2001-2002, 2004, 2006, 2008-2009, 2014-2015, 2018-2019, 2022, 2024 Russ Allbery <rra@cpan.org>

This program is free software; you may redistribute it and/or modify it under the same terms as Perl itself.

πŸ“ the full list of years is there for a reason β€” do not abbreviate it. i said what i said.

🌸 SEE ALSO 🌸

  • Pod::Text β€” the parent, the blueprint, the icon
  • Pod::Simple β€” the API era
  • Term::Cap β€” the one who finds your terminal settings

the current version of this module is always available from its web site at <https://www.eyrie.org/~eagle/software/podlators/> πŸ¦‹ she's also part of the Perl core distribution as of 5.6.0, so you literally can't escape her. iykyk πŸ’…


and that's the whole page, bestie!! slay πŸ’– this was lifted straight from perl v5.44.0, dated 2026-10-17, and the header line my girl rides under is <purple>Pod::T...ermcap(3perl)</purple> ✨ go format something cute. mwah πŸŽ€πŸ‘‘

πŸ“¦ where this page comes from
  • arch rolling: perl 5.44.0-1 Β· Artistic-1.0-Perl AND 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