IO::Pty - Pseudo TTY object class
use IO::Pty; $pty = new IO::Pty; $slave = $pty->slave; foreach $val (1..10) { print $pty "$val\n"; $_ = <$slave>; print "$_"; } close($slave);
IO::Pty provides an interface to allow the creation of a pseudo tty.
IO::Pty
IO::Pty inherits from IO::Handle and so provide all the methods defined by the IO::Handle package.
IO::Handle
The new contructor take no arguments and returns a new object which the master side of the pseudo tty.
new
The slave method will return a new IO::Pty object which represents the slave side of the pseudo tty
slave
Returns the name of the pseudo tty. On UNIX machines this will be the pathname of the device.
Graham Barr <gbarr@ti.com>
Based on original Ptty module by Nick Ing-Simmons <nik@tiuk.ti.com>
Most of the C code used in the XS file is covered by the GNU GENERAL PUBLIC LICENSE, See COPYING
All other code is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install IO::Tty, copy and paste the appropriate command in to your terminal.
cpanm
cpanm IO::Tty
CPAN shell
perl -MCPAN -e shell install IO::Tty
For more information on module installation, please visit the detailed CPAN module installation guide.