Speakup and Term::ReadLine::Perl

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I've been mucking around with Perl of late, and
I find that Speakup and the Term::ReadLine::Perl module don't play nicely
together.  Every time I backspace over my input, the prompt is spoken
after each press of backspace.  Here's a little program, cribbed from the
Term::ReadLine documentation:

use Term::ReadLine;
my $term = new Term::ReadLine 'Simple Perl calc';
my $prompt = "Enter your arithmetic expression: ";
my $OUT = $term->OUT || \*STDOUT;
while ( defined ($_ = $term->readline($prompt)) ) {
my $res = eval($_);
warn $@ if $@;
print $OUT $res, "\n" unless $@;
$term->addhistory($_) if /\S/;
}

Run this with Term::ReadLine::Perl installed, and type an expression
such as 2+2.  Try backspacing, and you'll hear the prompt repeated.

I'm certain that I know the cause of the problem.  The Perl module forcibly
redisplays the prompt after each press of the backspace key, and each
redisplay is faithfully rendered by Speakup.

What's the best way to fix or cope with this issue?

-- Chris



[Index of Archives]     [Linux for the Blind]     [Fedora Discussioin]     [Linux Kernel]     [Yosemite News]     [Big List of Linux Books]
  Powered by Linux