Term::Completion::_stty - utility package for Term::Completion using stty
This utility package contains few methods that are required for Term::Completion to put the terminal in "raw" mode and back. This package uses the
stty utility, which however is probably only available on UNIX.
stty raw -echoto set the terminal into "raw" mode, i.e. switch off the meaning of any control characters like CRTL-C etc. Also the echo of characters is switched off, so that the program has full control of what is typed and displayed.
Before doing that, tries to capture the terminal's current state with
stty -gand stores that for later use.
Will work on STDIN and ignore what was set as the input handle in Term::Completion.
Resets the terminal to its previous state, using the saved state. If that's unavailable, fall back to
stty -raw echo.
Reads one byte from the input handle. Uses standard getc(), see also "getc" in perlfunc.
Marek Rouchal <email@example.com>
Reused code from Term::Complete which is part of the Perl core distribution.
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.