It seems that Text::Wrap is putting tabs in the usage output. In my terminal (both Terminal
and iTerm on the Mac) this means things don't line up right. See attached screenshot. It looks
like a simple solution is to set $Text::Wrap::unexpand to a false value. From the docs:
"Text::Wrap::wrap() starts its work by expanding all the tabs in its input into spaces. The last
thing it does it to turn spaces back into tabs. If you do not want tabs in your results, set
$Text::Wrap::unexpand to a false value."
Here's my proposed patch:
--- Generic.pm.orig 2010-06-30 16:55:13.453172859 -0400
+++ Generic.pm.new 2010-06-30 16:54:40.930755096 -0400
@@ -398,6 +398,7 @@
while (@all) {
my ($key, $desc) = splice(@all, 0, 2);
local($Text::Wrap::columns) = 79;
+ local($Text::Wrap::unexpand) = 0;
$details .= wrap(
sprintf(" %-${col}s ", $key),
" " x ($col + 2),