Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re^2: Ter::ANSIColor is awesome, but.. (need help)

by mascip (Pilgrim)
on Mar 30, 2014 at 13:49 UTC ( #1080291=note: print w/ replies, xml ) Need Help??


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

Thank you Corion.
That makes sense, but it doesn't exactly solve my problem. I don't want to make this change in every part of the code where I'm displaying something.

I guess, most of my print statements are in the same file in fact, apart from exceptions. (Edit: In fact I just realized that I would really like these exceptions to be colourized...)

I'll try this tomorrow. But I'm still wondering if there is a better way...


Comment on Re^2: Ter::ANSIColor is awesome, but.. (need help)
Re^3: Ter::ANSIColor is awesome, but.. (need help)
by mascip (Pilgrim) on Mar 30, 2014 at 14:13 UTC

    The starting point of my reasoning is:

    There is only one place where I declare the variables that I want to colorize. If I could colorize them then and nowhere else, that would be much simpler.

      You will need to split up the two uses of $name, for internal program logic and for display.

        But this means passing around both variables everywhere, which is a pain.

        Oh! I just realized, I could I not notice? eq() is an operator, I can overload it! Time to Git clone and see if that works...

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1080291]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (7)
As of 2014-12-21 06:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (104 votes), past polls