Linux::Termios2 - wrap the Linux-specific struct termios2 structure and related
Linux::Termios2
struct termios2
This module is primarily intended as a helper for IO::Termios, but it could also be used directly.
use Linux::Termios2; use POSIX qw( TCSANOW ); my $termios = Linux::Termios2->new; $termios->getattr( 0 ); $termios->setospeed( 123456 ); $termios->setattr( 0, TCSANOW ) or die "Cannot TCSETS2 - $!";
This class provides an API equivalent to the POSIX::Termios class, except backed by the Linux-specific struct termios2 structure instead.
It uses the TCGETS2 and TCSETS2 family of ioctl() calls, meaning it has access to the arbitrary baud rate ability of the c_ispeed and c_ospeed fields with the BOTHER baud setting. These are accessed transparently, by simply calling setispeed and setospeed with baud rates in bits per second.
TCGETS2
TCSETS2
ioctl()
c_ispeed
c_ospeed
BOTHER
setispeed
setospeed
Paul Evans <leonerd@leonerd.org.uk>
To install Linux::Termios2, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Linux::Termios2
CPAN shell
perl -MCPAN -e shell install Linux::Termios2
For more information on module installation, please visit the detailed CPAN module installation guide.