The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Term::Completion::_stty - utility package for Term::Completion using stty

DESCRIPTION

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.

This is basically a copy from the original Term::Complete and provided for compatibility reasons. Instead of this, the Term::Completion::_POSIX implementation should be used.

Methods

set_raw_tty()

Uses stty raw -echo to set the terminal into "raw" mode, i.e. switch off the meaning of any control characters like CTRL-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 -g and stores that for later use.

Will work on STDIN and ignore what was set as the input handle in Term::Completion.

reset_tty()

Resets the terminal to its previous state, using the saved state. If that's unavailable, fall back to stty -raw echo.

get_key()

Reads one byte from the input handle. Uses standard getc(), see also "getc" in perlfunc.

AUTHOR

Marek Rouchal <marekr@cpan.org>

Reused code from Term::Complete which is part of the Perl core distribution.

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.

SEE ALSO

Term::Complete