Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number

Re: Term::ANSIColor not displaying BRIGHT colors

by Anonymous Monk
on Mar 06, 2018 at 17:51 UTC ( #1210420=note: print w/replies, xml ) Need Help??

in reply to Term::ANSIColor not displaying BRIGHT colors


Replies are listed 'Best First'.
Re^2: Term::ANSIColor not displaying BRIGHT colors
by Discipulus (Monsignor) on Mar 06, 2018 at 19:09 UTC
    eh no! Anonymous Monk,

    this is cheating! I've loosed an hour trying all possible combinations and reading obfuscated docs..

    from where this dotted syntax come from? Are the very same constants exported by :constants of Term::ANSIColor ?


    PS after the below Anonymous Monks's explanation (++ for the hint) I searched a bit and I found here 1     Bold/Bright     Applies brightness/intensity flag to foreground color so it seems that for them are synonymouses...

    And reading more carefully Term::ANSIColor notes:

    > Note that not all displays are ISO 6429-compliant, or even X3.64-compliant (or are even attempting to be so). This module will not work as expected on displays that do not honor these escape sequences, such as cmd.exe ..

    This may explains why :constants exports unuseful stuffs when on windows: perhaps Win32::Console::ANSI needs some mention in it's docs..

    There are no rules, there are no thumbs..
    Reinvent the wheel, then learn The Wheel; may be one day you reinvent one of THE WHEELS.

      Dotted syntax is just string concatenation. I'd even say my $BRIGHT_SUCCESS = $^O eq 'MSWin32' ? BOLD.GREEN : BRIGHT_GREEN; and use Term::ANSIColor qw/:constants/; unconditionally. Can see no need in OP's coding escape sequences manually. Short answer, above, because I "always" knew it's bold to be used to get bright, on Windows, and don't remember/lazy to search for sources.

Re^2: Term::ANSIColor not displaying BRIGHT colors
by g_speran (Beadle) on Mar 16, 2018 at 01:11 UTC
    BOLD.GREEN did the job. Thank you

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1210420]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (4)
As of 2018-07-23 10:07 GMT
Find Nodes?
    Voting Booth?
    It has been suggested to rename Perl 6 in order to boost its marketing potential. Which name would you prefer?

    Results (462 votes). Check out past polls.