# New Ticket Created by  "Carl Mäsak" 
# Please include the string:  [perl #116699]
# in the subject line of all future correspondence about this issue. 
# <URL: https://rt.perl.org:443/rt3/Ticket/Display.html?id=116699 >


<TimToady> nr: my $lines = +qx[tput lines]; my $cols  = +qx[tput
cols]; say "$lines $cols";
<TimToady> how come, when I run that program, it reports 24x80 rather
than the actual dimensions of my terminal?
<masak> TimToady: no idea. works locally.
<masak> no wait.
<masak> 24 80
<masak> here too.
<flussence> 35×116 on mine...
<masak> flussence: did you run tput directly?
<masak> (like I did first)
<flussence> I copy-pasted that line into the repl
<masak> on the repl it works.
<masak> just not with -e
<flussence> oh, yeah. 24 80 here
* masak submits rakudobug
<skids> LINES and COLUMNS are not exported by shell
<flussence> I'm betting it's libreadline doing something on its own to
get the numbers
<flussence> which then causes them to be defined for tput
* TimToady wonders if something's closing STDIN
<skids> it works if you export LINES; export COLUMNS even if you
resize after doing so.
<TimToady> skids: um, that's not going to help after you've started the program
<TimToady> turns out niecza closes STDIN on qx[] (or attaches to
/dev/null), but that doesn't explain rakudo's behavior
<TimToady> if I replace tput with cat, rakudo lets me type in a
number, and it comes back out

Reply via email to