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 if Unicode::GCString is installed. that's the whole check, bestie 🫢
  • $bool = USE_TERM_READKEY β€” true if Term::ReadKey is 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 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