Subject: | Win32 terminal sizing problem |
Spreadsheet::Perl v 0.06 on Win32 AS platforms has problems arising from
Term::Size, which requires sys/termios. These occur for Data::TreeDumper
and Spreadsheet::Perl::ASCIITable.
Environment involved:
This is perl, v5.8.2 built for MSWin32-x86-multi-thread
(with 25 registered patches, see perl -V for more detail)
Copyright 1987-2003, Larry Wall
Binary build 808 provided by ActiveState Corp. http://www.ActiveState.com
ActiveState is a division of Sophos.
Built Dec 9 2003 10:19:40
-------------
This appears to be fixable by substituting use of Win32::Console for
this platform.... typically using the following (obviously best if
conditionally set after platform-detection):
< use Term::Size ;
Show quoted text
> use Win32::Console;
> my $CONSOLE = new Win32::Console;
> $CONSOLE->Alloc();
# and then, later, substitution of something like
< my ($cols, $rows) = Term::Size::chars *STDOUT{IO} ;
# with something like ( $screenwidth involved in ASCIITable)
Show quoted text> my ($cols, $rows) = $CONSOLE->Size();
NOT fully tested but seems OK..