Term::Table::Util(3)

πŸ“¦ version 0.024, in opensuse-leap 16.0

πŸ’… Term::Table::Util

okay so bestie, welcome to Term::Table::Util(3) β€” the little sidekick module that Term::Table leans on. It's in the User Contributed Perl Documentation corner of the man pages, and honestly? It's iconic for how much it does with so little. πŸŽ€


✨ NAME ✨

Term::Table::Util β€” Utilities for Term::Table. that's it, that's the whole vibe. 🫢


🌸 DESCRIPTION 🌸

This package exports some tools used by Term::Table. lowkey just a little grab-bag of helpers the main module reaches for, no cap. πŸ’œ


πŸ‘‘ EXPORTS πŸ‘‘

⭐ CONSTANTS ⭐

these are the two lil booleans you can import, and they're basically vibe checks for what's installed on your system πŸ”₯

  • $bool = USE_GCS β€” True if Unicode::GCString is installed. so if your box is fancy enough to have it, this is all 1 and happy. ✨
  • $bool = USE_TERM_READKEY β€” True if Term::ReadKey is installed. same deal, just a yes/no on whether that module is chilling in your @INC. πŸ’…

πŸ¦‹ UTILITIES πŸ¦‹

the actual functional girlies of the module πŸ’–

  • $width = term_size() β€” Get the width of the terminal. literally just "how many columns we working with rn" πŸ“

If the $TABLE_TERM_SIZE environment variable is set then that value will be returned. so like, you can just override it yourself if you want, main character behaviour honestly. πŸ‘‘

This will default to 80 if there is no good way to get the size, or if the size is unreasonably small. bc a 3-column terminal is not giving usable output bestie πŸ’€

If Term::ReadKey is installed it will be used. (that's where USE_TERM_READKEY from up top comes in, iykyk 🌈)

  • $width = uni_length($string) β€” Get the width (in columns) of the specified string. When Unicode::GCString is installed this will work on unicode strings, otherwise it will just use length($string). so like, with the fancy module you get actual column widths for the emoji-and-grapheme girlies 🌸🧚, and without it you get plain old character count. know the difference, fr fr πŸ’œ

πŸ”— SOURCE πŸ”—

The source code repository for Term-Table can be found at http://github.com/exodist/Term-Table/. go star it, it's free and it slays ⭐


🫢 MAINTAINERS 🫢

Chad Granum <exodist@cpan.org> β€” the one holding it down πŸ™


🌟 AUTHORS 🌟

Chad Granum <exodist@cpan.org> β€” yes same person, he's carrying the whole team and we love that for him πŸ‘‘


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/

periodt. legal stuff said, all facts intact, nothing skipped. πŸ’…

and that's the whole page bestie!! brought to you by perl v5.42.0, dated 2024-12-28 β€” it's giving vintage (okay not that vintage πŸ™ˆ) and it ate, no crumbs left. now go center your tables correctly πŸ’–βœ¨πŸŽ€

πŸ“¦ where this page comes from