in reply to Re^10: Ter::ANSIColor is awesome, but.. (need help)
in thread Term::ANSIColor is awesome, but.. (need help)

Well, if overloading stringification calls a function (method, whatever), caller will return name/file/line of who is calling .... so yeah, caller tells you what file on what line, and you can peek at the source to see if its a call to print .... hopefully that rings some alarms for you :)
  • Comment on Re^11: Ter::ANSIColor is awesome, but.. (need help)

Replies are listed 'Best First'.
Re^12: Ter::ANSIColor is awesome, but.. (need help)
by mascip (Pilgrim) on Mar 31, 2014 at 14:30 UTC

    This sounds dangerous indeed. I think I'll go with tye's proposal of simulating a "print context" by using a class variable (or attribute).