When I run a command with --help, it wraps at 80 columns.
When I run
perl -MTerm::Size::Any -E 'say [ Term::Size::Any::chars() ]->[0];'
141
it returns the correct number of columns. Likewise, running the --help with
TEST_FORCE_COLUMN_SIZE=141
also works correctly. But by default it's not working.
It seems that the eval syntax doesn't work:
sub _get_line_fold {
my $columns = $ENV{TEST_FORCE_COLUMN_SIZE}
|| eval {
use_module("Term::Size::Any");
[ Term::Size::Any::chars() ]->[0];
} || 80;
return Text::LineFold->new( ColMax => $columns - 4 );
}
Running
perl -MModule::Runtime=use_module \\
-E 'my $columns = eval { use_module("Term::Size::Any"); [ Term::Size::Any::chars() ]->[0]; }; say $columns; '
displays nothing
When I run a command with
--help, it wraps at 80 columns.When I run
it returns the correct number of columns. Likewise, running the
--helpwithalso works correctly. But by default it's not working.
It seems that the eval syntax doesn't work:
Running
displays nothing