Change behaviour for terminal width detection
authorSimon Amor <simon@leaky.org>
Fri, 27 Jan 2017 15:45:13 +0000 (15:45 +0000)
committerSimon Amor <simon@leaky.org>
Fri, 27 Jan 2017 15:57:43 +0000 (15:57 +0000)
commitb4ed26ff40a4cad56a4b088ba0cf006bfde8df82
treeda27eb647eff25aa6befc1e7ccba9d1b381c7704
parent59e4fb5d7e98d588779a88e791af881ad8e953df
Change behaviour for terminal width detection

Sometimes Term::Size::Any is installed but can return a width of
undef. This causes the eval to succeed but then it falls back to
using 80 characters.

This change allows it to look at $ENV{COLUMNS} for a hint if the
width isn't defined or if the eval fails due to a missing module
instead of just if the eval returns an error.
lib/Catalyst/Utils.pm