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:
sub ... { local( $Term::ANSIColor::InOutput ) = 1; return CORE::...( @_ ); }
and have the stringification include the color escapes if $InOutput is true.
- tye
In reply to Re: Term::ANSIColor is awesome, but.. (need help) (overload and override)
by tye
in thread Term::ANSIColor is awesome, but.. (need help)
by mascip
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |