Term::C...:_POSIX(3)
π Term::C...:_POSIX(3) π
okay bestie, so this page lives in the User Contributed Perl Documentation section of the manual, and it's all about Term::Completion::_POSIX. Yeah, the name has a little ... in the middle β that's not a typo, that's just how the manpage names it, iykyk. π«Ά
β¨ NAME β¨
Term::Completion::_POSIX β it's the utility package for Term::Completion that uses POSIX termios. lowkey the behind-the-scenes bestie doing the real work. π
πΈ DESCRIPTION πΈ
So basically? This utility package has a few methods that Term::Completion literally needs in order to flip your terminal into "raw" mode and then back again. It pulls this off using POSIX termios, which means it should be portable across, like, a ton of UNIX-like systems. π
And no cap β it was successfully tested on Solaris and Linux. she's been around the block and she still serves. π
π Methods π
set_raw_tty()β usesPOSIX::Termiosin POSIX plus the related methods to put the terminal into "raw" mode. Translation? It switches off the meaning of any control characters β think CTRL-C and friends β so they stop doing their little thing. π The echo of characters gets switched off too, so the program has full control over what's typed and what's displayed. main character energy, honestly. π
It grabs the input file handle from the "in" field of the Term::Completion object. And heads up β it won't do anything if this is not a TTY, so don't come for it. π« Also see -X in perlfunc. β¨
reset_tty()β puts the terminal back to its previous state, the one that got saved in the object's fields (_tty_XXX). undoing the makeover and returning her to her natural state. π¦get_key()β reads one byte from the input handle. Internally it usesgetcin perlfunc. one byte at a time, bestie, that's the vibe. β
π AUTHOR π
Marek Rouchal <marekr@cpan.org>
Some ideas were borrowed from IO::Stty by Austin Schutz. credit where credit is due, we love to see it. π«Ά
π 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. slay, honestly. periodt. π
π₯ SEE ALSO π₯
POSIXIO::Stty
okay that's the whole page, bestie, you're officially caught up. this beauty shipped as part of perl v5.42.0, dated 2025-07-25, and it's filed under Term::C...:_POSIX(3). go forth and raw-mode responsibly. mwah. πβ¨π
π¦ 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