On 02/26/2017 07:28 AM, yary wrote:
On Sun, Feb 26, 2017 at 8:21 AM, ToddAndMargo <toddandma...@zoho.com <mailto:toddandma...@zoho.com>> wrote: Now what am I doing wrong? Read the POD!
I was over here at https://github.com/tadzik/Terminal-ANSIColor/ "This is a Term::ANSIColor module for Perl 6." I mistook the above line a meaning a "direct replacement". So I never went any further. Had I gone further, it would have been obvious. And he doesn't link the POD. Where is the POD by the way? And my mistake was that I was calling out stuff on the use line that did not exist in the module. I thought my syntax was messed up (still in P5), especially since everything else I do wrong is a syntax error. Speaking of syntax errors, what is wrong with these two lines (not used a the same time)? use Terminal::ANSIColor qw[ color ]; use Terminal::ANSIColor::color; Thank you for the help! -T
use Terminal::ANSIColor; say color('bold'), "this is in bold", color('reset'); .... =head2 C<color()> Given a string with color names, the output produced by C<color()> sets the terminal output so the text printed after it will be colored as specified. The following color names are recognised: reset bold underline inverse black red green yellow blue magenta cyan white default on_black on_red on_green on_yellow on_blue on_magenta on_cyan on_white on_default The on_* family of colors correspond to the background colors. One or three numeric color values in the range 0..255 may also be specified: N # 256-color map: 8 default + 8 bright + 216 rgb cube + 24 gray on_N # Same, but background N,N,N # 24-bit r,g,b foreground color on_N,N,N # 24-bit r,g,b background color In short the individual color names are no longer exportable, now use the "color" sub. maybe you can export only the "color" sub, and not the other subs that module exports, if that's what you want for your code. -y
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Computers are like air conditioners. They malfunction when you open windows ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~