Term::ANSIColor 3.02

The primary change in this release is some cleanup of the AUTOLOAD sub in the module that generates the constant subs. If a constant for a color that wasn't previously used is encountered, AUTOLOAD uses eval to generate the sub on the fly, but this was eating $@. If you want to use color constants around reporting an exception in Perl, this is unhelpful.

AUTOLOAD now preserves $@, and I also fixed a couple of other bugs I noticed by visual inspection while I was there: Term::ANSIColor was ignoring all unknown functions, not just valid constants, when colors were disabled, and it was not inspecting $@ after eval and hence wasn't catching errors in creating the constant sub. Both of those bugs are also now fixed.

Also in this release I added support for italic and the corresponding ITALIC constant. These weren't previously supported since I didn't know of any terminal emulator that implemented them, but apparently urxvt does.

You can get the latest release from the Term::ANSIColor distribution page.

Posted: 2012-03-18 14:39 — Why no comments?

Last spun 2022-02-06 from thread modified 2013-01-04