[9758] in Perl-Users-Digest

home help back first fref pref prev next nref lref last post

Term::ReadKey installed in /afs/sipb/contrib/perl

daemon@ATHENA.MIT.EDU (Jacob Morzinski)
Wed Aug 5 02:44:21 1998

Date: Wed, 5 Aug 1998 02:44:15 -0400 (EDT)
From: Jacob Morzinski <jmorzins@MIT.EDU>
To: perl-users@MIT.EDU

The module Term::ReadKey has been installed in /afs/sipb/contrib/perl/.

Among other features, Term::ReadKey lets perl scripts read from
stdin in cooked or in raw mode, perhaps with timeouts to avoid
blocking; and permits turning off echoing of input as well.  The
README elaborates:
 This module, ReadKey, provides ioctl control for terminals and Win32
 consoles so the input modes can be changed (thus allowing reads of a single
 character at a time), and also provides non-blocking reads of stdin, as well
 as several other terminal related features, including retrieval/modification
 of the screen size, and retrieval/modification of the control characters.


One way to include it in your scripts is:

    use lib "/afs/sipb/contrib/perl/arch/$env{ATHENA_SYS}/lib/perl5.004/site_perl:/afs/sipb/contrib/perl/arch/share/perl5.004/site_perl";
    use Term::ReadKey;

The test script that came with Term::ReadKey is a good
demonstration of what the module is capable of.  A copy of the
test script has been saved in
    /afs/sipb/contrib/perl/arch/share/demo/term-readkey-test

Enjoy,
 Jacob Morzinski


home help back first fref pref prev next nref lref last post