line |
true |
false |
branch |
272
|
3 |
27 |
unless ($attr and defined $ATTRIBUTES{lc $attr}) |
278
|
2 |
25 |
if ($ENV{'ANSI_COLORS_DISABLED'} or defined $ENV{'NO_COLOR'}) |
298
|
8 |
28 |
if ($ENV{'ANSI_COLORS_DISABLED'} or defined $ENV{'NO_COLOR'}) { } |
|
6 |
22 |
elsif ($AUTOLOCAL and @_) { } |
|
6 |
16 |
elsif ($AUTORESET and @_) { } |
|
6 |
24 |
if ($ENV{'ANSI_COLORS_DISABLED'} or defined $ENV{'NO_COLOR'}) { } |
|
3 |
21 |
elsif ($AUTOLOCAL and @_) { } |
|
4 |
17 |
elsif ($AUTORESET and @_) { } |
|
2 |
7 |
if ($ENV{'ANSI_COLORS_DISABLED'} or defined $ENV{'NO_COLOR'}) { } |
|
1 |
6 |
elsif ($AUTOLOCAL and @_) { } |
|
1 |
5 |
elsif ($AUTORESET and @_) { } |
|
4 |
11 |
if ($ENV{'ANSI_COLORS_DISABLED'} or defined $ENV{'NO_COLOR'}) { } |
|
2 |
9 |
elsif ($AUTOLOCAL and @_) { } |
|
2 |
7 |
elsif ($AUTORESET and @_) { } |
|
4 |
11 |
if ($ENV{'ANSI_COLORS_DISABLED'} or defined $ENV{'NO_COLOR'}) { } |
|
2 |
9 |
elsif ($AUTOLOCAL and @_) { } |
|
2 |
7 |
elsif ($AUTORESET and @_) { } |
|
2 |
8 |
if ($ENV{'ANSI_COLORS_DISABLED'} or defined $ENV{'NO_COLOR'}) { } |
|
1 |
7 |
elsif ($AUTOLOCAL and @_) { } |
|
1 |
6 |
elsif ($AUTORESET and @_) { } |
|
2 |
6 |
if ($ENV{'ANSI_COLORS_DISABLED'} or defined $ENV{'NO_COLOR'}) { } |
|
1 |
5 |
elsif ($AUTOLOCAL and @_) { } |
|
1 |
4 |
elsif ($AUTORESET and @_) { } |
|
2 |
7 |
if ($ENV{'ANSI_COLORS_DISABLED'} or defined $ENV{'NO_COLOR'}) { } |
|
1 |
6 |
elsif ($AUTOLOCAL and @_) { } |
|
1 |
5 |
elsif ($AUTORESET and @_) { } |
|
2 |
6 |
if ($ENV{'ANSI_COLORS_DISABLED'} or defined $ENV{'NO_COLOR'}) { } |
|
1 |
5 |
elsif ($AUTOLOCAL and @_) { } |
|
1 |
4 |
elsif ($AUTORESET and @_) { } |
|
2 |
9 |
if ($ENV{'ANSI_COLORS_DISABLED'} or defined $ENV{'NO_COLOR'}) { } |
|
1 |
8 |
elsif ($AUTOLOCAL and @_) { } |
|
1 |
7 |
elsif ($AUTORESET and @_) { } |
|
2 |
9 |
if ($ENV{'ANSI_COLORS_DISABLED'} or defined $ENV{'NO_COLOR'}) { } |
|
1 |
8 |
elsif ($AUTOLOCAL and @_) { } |
|
1 |
7 |
elsif ($AUTORESET and @_) { } |
|
2 |
31 |
if ($ENV{'ANSI_COLORS_DISABLED'} or defined $ENV{'NO_COLOR'}) { } |
|
1 |
30 |
elsif ($AUTOLOCAL and @_) { } |
|
2 |
28 |
elsif ($AUTORESET and @_) { } |
|
2 |
5 |
if ($ENV{'ANSI_COLORS_DISABLED'} or defined $ENV{'NO_COLOR'}) { } |
|
1 |
4 |
elsif ($AUTOLOCAL and @_) { } |
|
1 |
3 |
elsif ($AUTORESET and @_) { } |
|
2 |
5 |
if ($ENV{'ANSI_COLORS_DISABLED'} or defined $ENV{'NO_COLOR'}) { } |
|
1 |
4 |
elsif ($AUTOLOCAL and @_) { } |
|
1 |
3 |
elsif ($AUTORESET and @_) { } |
315
|
1 |
24 |
unless ($eval_result) |
346
|
8 |
24 |
if (@COLORSTACK) |
364
|
8 |
24 |
if (@COLORSTACK) { } |
398
|
3 |
75 |
if ($ENV{'ANSI_COLORS_DISABLED'} or defined $ENV{'NO_COLOR'}) |
404
|
8 |
86 |
defined $ALIASES{$_} ? : |
411
|
66 |
34 |
if (defined $ATTRIBUTES{$code}) { } |
|
18 |
16 |
elsif ($code =~ / \A (on_)? r([0-9]+) g([0-9]+) b([0-9]+) \z /msx) { } |
415
|
2 |
14 |
if ($r > 255 or $g > 255 or $b > 255) |
418
|
7 |
7 |
$1 ? : |
430
|
54 |
1 |
$attribute ne '' ? : |
453
|
1 |
41 |
unless (defined $attrs) |
474
|
15 |
29 |
if ($num =~ / \A 0*([34])8 ; 0*2 ; (\d+) ; (\d+) ; (\d+) \z /msx) { } |
476
|
4 |
7 |
if ($r > 255 or $g > 255 or $b > 255) |
479
|
3 |
4 |
$1 == 4 ? : |
484
|
15 |
14 |
unless (defined $name) |
514
|
2 |
16 |
if (ref $first and ref $first eq 'ARRAY') { } |
523
|
2 |
16 |
if ($ENV{'ANSI_COLORS_DISABLED'} or defined $ENV{'NO_COLOR'}) |
532
|
7 |
8 |
if (defined $EACHLINE) { } |
533
|
9 |
9 |
$_ ne $EACHLINE ? : |
554
|
3 |
9 |
unless (@color) |
555
|
2 |
1 |
if (exists $ALIASES{$alias}) { } |
566
|
2 |
7 |
if (not $alias =~ / \A [a-zA-Z0-9._-]+ \z /msx) { } |
|
1 |
6 |
elsif ($ATTRIBUTES{$alias}) { } |
575
|
2 |
8 |
defined $ALIASES{$_} ? : |
579
|
1 |
9 |
unless (exists $ATTRIBUTES{$attribute}) |
602
|
1 |
4 |
wantarray ? : |
615
|
12 |
26 |
if defined $ATTRIBUTES{$code} |
616
|
2 |
24 |
if defined $ALIASES{$code} |
617
|
10 |
14 |
if ($code =~ / \A (?: on_ )? r (\d+) g (\d+) b (\d+) \z /msx) |
618
|
6 |
2 |
if $1 <= 255 and $2 <= 255 and $3 <= 255 |