Subject: | Term::Prompt messes with $\ because of the lastest change 2.34 in Term::Readkey |
Date: | Wed, 8 Feb 2017 21:02:20 +0100 |
To: | bug-TermReadKey [...] rt.cpan.org |
From: | Johan Laenen <johan.laenen [...] gmail.com> |
Hi,
The following oneliner gives two lines of output instead of the three
I expect to see:
perl -e 'use Text::Wrap; use Term::Prompt qw/prompt/; my $p =
prompt("y", "", "", ""); { local $\="\n"; print "the quick brown fox"
} {local $\="\n"; print "jumps over the lazy dog." };'
yields:
(y or n) [default n]
the quick brown foxjumps over the lazy dog.
I expected:
(y or n) [default n]
the quick brown fox
jumps over the lazy dog.
Now, this is on debian strech/sid, perl v5.24.1, Term::Readkey 2.37
and Term::Prompt 1.04.
If I downgrade Term::Readkey to 2.33 the code above works as expected.
2.34 "Fix GetTerminalSize() argument handling". 2.33 is accidentally
*ignoring* the argument and using \*STDOUT. 2.34 is working right...
which causes it to get far enough to break something.
Greetings,
Johan Laenen