Subject: | you only accept one form of parameters for 'colored' |
Date: | Tue, 27 Nov 2018 17:48:55 +0200 |
To: | bug-Term-ANSIColor-Conditional [...] rt.cpan.org |
From: | Alexander Karelas <alex.karelas [...] gmail.com> |
the original 'colored' (that of Term::ANSIColor) accepts two forms of
parameters, you cover none of the two completely.
First way:
print colored('hi there', 'red');
Second way:
print colored(['red'], 'hi ', 'there');
See the completely different outputs that this script produces, between
when COLOR is 0 and when COLOR = 1:
*#!/usr/bin/env perl**
**
**use v5.10;**
**use strict;**
**use warnings;**
**
**use Term::ANSIColor::Conditional;**
**
**for (0, 1) {**
** $Term::ANSIColor::Conditional::COLOR = $_;**
** say colored(['red'], 'colored with array: ', 'hi ', 'there ');**
** say colored('yo man', 'red');**
**}*
This is quite an important bug, and hence needs fixing.