[Po4a-commits] po4a/lib/Locale/Po4a Common.pm,1.5,1.6

Martin Quinson po4a-devel@lists.alioth.debian.org
Thu, 03 Mar 2005 16:04:42 +0000


Update of /cvsroot/po4a/po4a/lib/Locale/Po4a
In directory haydn:/tmp/cvs-serv30889

Modified Files:
	Common.pm 
Log Message:
Fix my previous commit

Index: Common.pm
===================================================================
RCS file: /cvsroot/po4a/po4a/lib/Locale/Po4a/Common.pm,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- Common.pm	3 Mar 2005 09:58:32 -0000	1.5
+++ Common.pm	3 Mar 2005 16:04:40 -0000	1.6
@@ -31,16 +31,13 @@
 use warnings;
 use Locale::gettext;
 use Text::WrapI18N qw(wrap $columns);
+use Term::ReadKey qw(GetTerminalSize);
 
 sub setcolumns {
-    eval qq{
-	# won't work on windows, at least.
-	use Term::ReadKey qw(GetTerminalSize);
-	($columns) = GetTerminalSize();
-    };
-    if ($@) {
-	$columns = $ENV{'COLUMNS'} || 80;
-    }
+    my ($col,$h,$cp,$hp);
+    ($col,$h,$cp,$hp) = GetTerminalSize();
+    $columns = $ENV{'COLUMNS'} || $col || 80;
+#    print "set col to $columns\n";
 }
 
 sub min {