I cannot overload eq() because Term::ANSIColor doesn't return an object. Ouch. Are there any alternative implementations out there that return an object?
It could look like this:
my $name = String::Colored->new('Jon', 'red'); # improvised module nam +e # Overloads stringification print $name; # Overloads string comparison operators my $res = $name eq 'Jon'; $name->stripcolor;
In reply to Re^6: Ter::ANSIColor is awesome, but.. (need help)
by mascip
in thread Term::ANSIColor is awesome, but.. (need help)
by mascip
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |