Taking better advantage of your full terminal width for debugging

Discussion

When you start Catalyst in debug mode, you get the running debug information to your terminal. Useful stuff! However by default the terminal output is set to 80 columns. If you use a differnt terminal width you can do the following to get Catalyst to take advantage:

Set COLUMNS in your shell to the correct width. For bash users you can do this:

    export COLUMNS=$COLUMNS

Install Term::Size::Any, which will detect the current window width and just use that. I often add this as a developer requirement.

What if you like to resize your terminal? We added a feature that lets you instruct Catalyst to reset the debugging columns! You can add something like this if in development:

    $SIG{WINCH} = sub { Catalyst::Utils::term_width(1) };

See https://metacpan.org/pod/Catalyst::Utils#term_width for more.

If this turns out to be broadly stable we might add it to core at some point.

Conclusion

Thanks to frew for the new reset term width feature!

Author

John Napiorkowski jjnapiork@cpan.org