Term::C...readkey(3)
π Term::Completion::_readkey β the vibe β¨
ok so bestie, this is the utility package for Term::Completion β the lil backstage queen that handles the terminal's "raw" mode and gets it back to normal after. And it does all of that using Term::ReadKey, which is the portable icon that works across, like, many systems. no cap. π«Ά
This page lives in the User Contributed Perl Documentation corner of the manual universe, and yes, she's a section 3 girlie (library calls, iykyk).
π DESCRIPTION π
This utility package contains a few methods that Term::Completion literally cannot live without β they're what put the terminal into "raw" mode and then bring it back home safe. π
And the way it does that? It uses Term::ReadKey, which should be portable across many systems. highkey the whole point. β¨
πΈ Methods πΈ
set_raw_tty()β usesTerm::ReadKey'sReadMode 4to yeet the terminal into"raw"mode, meaning it switches off the meaning of any control characters like CTRL-C etc. π also the echo of characters gets switched off, so the program has full control of what is typed and displayed. main character energy fr. it gets the input file handle from the"in"field of theTerm::Completionobject.reset_tty()β puts the terminal back to its previous state usingReadMode 0. the glow-up reversal, we love a restore point. πget_key()β reads one byte from the input handle. usesReadKey. one (1) byte, bestie, that's the whole job. π¦get_term_size()β figures out the terminal size withGetTerminalSizeand returns the list of columns and rows (two integers). just two lil numbers, slay. β¨
π AUTHOR π
Marek Rouchal <marekr@cpan.org>
π COPYRIGHT π
Copyright (c) 2009, Marek Rouchal. All Rights Reserved.
This module is free software. It may be used, redistributed and/or modified under the same terms as Perl itself. periodt. π«Ά
π SEE ALSO π
Term::ReadKey
π cute lil sign-off: this page is from perlv5.42.0, dated2025-07-25. bye bestie, go put your terminal in raw mode responsibly π β¨
π¦ where this page comes from
- fedora 43: perl-Term-Completion 1.02-6.fc43 Β· GPL-1.0-or-later OR Artistic-1.0-Perl
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms