Term::Table::Util(3pm)
π Term::Table::Util β bestie edition
okay so this is a Perl module from the Perl Programmers Reference Guide, it lives at Term::Table::Util(3pm), and it's basically the little utility drawer that the bigger Term::Table module keeps its tools in. cute, right? π
β¨ NAME β¨
Term::Table::Util β utilities for Term::Table. that's it, that's the whole vibe. it's giving "supporting character who's actually the backbone of the whole operation" π
π¦ DESCRIPTION π¦
so this package exports some tools that Term::Table uses. not a huge dramatic library, just the useful little helpers. lowkey iconic for it. β¨
πΈ EXPORTS πΈ
π CONSTANTS π
$bool = USE_GCSβ true ifUnicode::GCStringis installed. that's the whole check, bestie π«Ά$bool = USE_TERM_READKEYβ true ifTerm::ReadKeyis installed. same deal, just a yes/no vibe check on whether it's there π
π§ UTILITIES π§
$width = term_size()β grabs the width of your terminal. π₯οΈ
if the $TABLE_TERM_SIZE environment variable is set, then that value gets returned instead β env var wins, no cap.
it'll default to 80 if there's no good way to figure out the size, or if the size it found is unreasonably small. so worst case you get a respectable 80 columns, we don't do chaos here π
and if Term::ReadKey is installed, that's what it uses to do the work. slay. π₯
$width = uni_length($string)β gives you the width, in columns, of the string you passed in. π
when Unicode::GCString is installed this will actually work properly on unicode strings β like, real column widths, main character energy. otherwise it just falls back to length($string), which is the "we tried our best" version. π
π₯ SOURCE π₯
the source code repo for Term-Table lives right here, go be nosy:
http://github.com/exodist/Term-Table/
π MAINTAINERS π
Chad Granum <exodist@cpan.org> β yes him again, he's everywhere. π«Ά
π AUTHORS π
Chad Granum <exodist@cpan.org> β same person, listed twice, and honestly? respect. π
β COPYRIGHT β
Copyright 2016 Chad Granum <exodist@cpan.org>. π
this program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. π¦
see http://dev.perl.org/licenses/ for the license deets. π
k that's the whole page bestie, thanks for reading π
this little beauty shipped with perl v5.42.3, dated 2026-11-03, and you can find it again any time under Term::Table::Util(3pm). periodt. π
β¨
π¦ where this page comes from
- alpine 3.24: perl-doc 5.42.3-r0 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms