summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/App/Termcast.pm8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/App/Termcast.pm b/lib/App/Termcast.pm
index b5476fd..11ea3e2 100644
--- a/lib/App/Termcast.pm
+++ b/lib/App/Termcast.pm
@@ -53,14 +53,14 @@ sub run {
my $pty = IO::Pty::Easy->new;
$pty->spawn(@argv);
my $termios = POSIX::Termios->new;
- $termios->getattr(fileno($pty->{pty}));
+ $termios->getattr(fileno($pty));
my $lflag = $termios->getlflag;
$termios->setlflag($lflag | POSIX::ECHO);
- $termios->setattr(fileno($pty->{pty}), POSIX::TCSANOW);
+ $termios->setattr(fileno($pty), POSIX::TCSANOW);
my ($rin, $rout) = '';
vec($rin, fileno(STDIN) ,1) = 1;
- vec($rin, fileno($pty->{pty}), 1) = 1;
+ vec($rin, fileno($pty), 1) = 1;
ReadMode 4;
while (1) {
my $ready = select($rout = $rin, undef, undef, undef);
@@ -73,7 +73,7 @@ sub run {
}
$pty->write($buf);
}
- if (vec($rout, fileno($pty->{pty}), 1)) {
+ if (vec($rout, fileno($pty), 1)) {
my $buf = $pty->read(0);
if (!$buf) {
warn "Error reading from pty: $!" unless defined $buf;