看起来设置“ColMax”有效,但它发出两个警告。难道我做错了什么?
#!/usr/bin/env perl
use strict;
use warnings;
use utf8;
use open qw(:std :utf8);
use Term::ReadKey;
use Text::LineFold;
use Term::Choose qw(choose);
my %text = (
a => 'aaaaaaaaaa ' x 100,
b => 'bbbbbbbbbb ' x 100,
c => 'cccccccccc ' x 100,
);
my $line_fold = Text::LineFold->new(
Charset => 'utf-8',
OutputCharset => '_UNICODE_',
Urgent => 'FORCE',
);
while ( 1 ) {
my $choice = choose( [ undef, 'a', 'b', 'c' ], { undef => 'Exit' } );
last if ! defined $choice;
$line_fold->config( 'ColMax', GetTerminalSize );
print $line_fold->fold( '' , '', $text{$choice} );
}
_config: Setting unknown option 35 at [...]/Unicode/LineBreak.pm line 217.
_config: Setting unknown option 0 at [...]/Unicode/LineBreak.pm line 217.
# normal output ...