Subject: | Use $ENV{COLUMNS} fist in Catalyst::Utils::term_width |
Date: | Wed, 30 Jul 2014 09:11:31 +0300 |
To: | bug-Catalyst-Runtime [...] rt.cpan.org |
From: | Mitry Matyushkov <i.mitry [...] gmail.com> |
Please check $ENV{COLUMNS} value fist in Catalyst::Utils::term_width and
if it is not set then try to guess terminal width via Term::Size::Any.
Current implementation does not look at $ENV{COLUMNS} at all if
Term::Size::Any is installed.
```
$ perl -MTerm::Size::Any -e 'print Term::Size::Any::chars . "\n"'
124
$ perl -MCatalyst::Utils -e 'print Catalyst::Utils::term_width . "\n"'
124
correct
$ COLUMNS=80 perl -MCatalyst::Utils -e 'print
Catalyst::Utils::term_width . "\n"'
124
incorrect -> should be 80
```
Thanks.