5

ActiveState Perl - 5.26 on Windows 10 - 64 bit.

When I am trying to launch cpan from CMD - I see the following error:

C:\Users\orenm>cpan
Unable to get Terminal Size. The Win32 GetConsoleScreenBufferInfo call didn't work. The COLUMNS and LINES environment variables didn't work. at C:\Perl64\lib/Term/ReadLine/readline.pm line 410. 

Why does it happen? What shall I do with it?

Oren Maurer
  • 129
  • 2
  • 6
  • 2
    This is just a warning. You can ignore it. Alternatively, consider setting the `COLUMNS` and `LINES` environment variables to the size of your terminal. – Corion Jan 23 '19 at 10:13
  • 2
    Also, maybe you are launching Perl in a fancy console emulator and not the raw `cmd.exe` as suggested by [this](https://rt.cpan.org/Public/Bug/Display.html?id=24598) – Corion Jan 23 '19 at 10:22
  • 2
    Just an idea, try running `set TERM=dumb` before you run `cpan` ([related thread](https://www.perlmonks.org/?node_id=1214933)). – haukex Jan 23 '19 at 14:42
  • 2
    The `set TERM=dumb` works! @haukex - Thanks. – Oren Maurer Jan 24 '19 at 05:06

1 Answers1

2

It's trying to figure out your terminals size. You can use a 'dumb' terminal.

set TERM=dumb

will eliminate the warning.

Bill Smith
  • 21
  • 3