Fix spurious Text::Wrap warning on console.pl
[spider.git] / perl / console.pl
index a0cb567175ec7f55b4380626e333311e1216ec6b..faf7c5ce062890e26090264a64b4d617203e038f 100755 (executable)
@@ -469,7 +469,6 @@ sub rec_stdin
 # add a line to the end of the top screen
 sub addtotop
 {
-       $Text::Wrap::Columns = $cols;
        while (@_) {
                my $inbuf = shift;
                my $l = length $inbuf;
@@ -477,6 +476,7 @@ sub addtotop
                if ($l > $cols) {
                        $inbuf =~ s/\s+/ /g;
                        if (length $inbuf > $cols) {
+                               $Text::Wrap::columns = $cols;
                                push @sh, split /\n/, wrap('',' ' x 19, $inbuf);
                        } else {
                                push @sh, $inbuf;
@@ -605,13 +605,11 @@ $SIG{'HUP'} = \&sig_term;
 
 
 # start upb
-$Text::Wrap::Columns = $cols;
+$Text::Wrap::columns = $cols;
 doresize();
 
 $SIG{__DIE__} = \&sig_term;
 
-#$Text::Wrap::Columns = $cols;
-
 my $lastmin = 0;