No such thing as a small change | |
PerlMonks |
Re: Term::ANSIColor is awesome, but.. (need help) (overload and override)by tye (Sage) |
on Mar 30, 2014 at 19:24 UTC ( [id://1080318]=note: print w/replies, xml ) | Need Help?? |
Change the module to produce objects with stringification overloaded to return the original string (w/o color escapes). Override the output functions you use (like 'print'), to do something like:
and have the stringification include the color escapes if $InOutput is true. - tye
In Section
Seekers of Perl Wisdom
|
|