in reply to Re^5: Ter::ANSIColor is awesome, but.. (need help)
in thread Term::ANSIColor is awesome, but.. (need help)
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;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^7: Ter::ANSIColor is awesome, but.. (need help)
by Corion (Patriarch) on Mar 30, 2014 at 16:04 UTC | |
by mascip (Pilgrim) on Mar 30, 2014 at 16:17 UTC | |
by Corion (Patriarch) on Mar 30, 2014 at 16:24 UTC | |
by mascip (Pilgrim) on Mar 30, 2014 at 16:41 UTC | |
by Anonymous Monk on Mar 31, 2014 at 07:09 UTC | |
|