… | |
… | |
27 | } |
27 | } |
28 | |
28 | |
29 | sub sgr { |
29 | sub sgr { |
30 | # we just assume ANSI almost everywhere |
30 | # we just assume ANSI almost everywhere |
31 | # red 31, yellow 33, green 32 |
31 | # red 31, yellow 33, green 32 |
|
|
32 | local $| = 1; |
32 | |
33 | |
33 | $ENV{PERL_CANARY_STABILITY_COLOUR} ne 0 |
34 | $ENV{PERL_CANARY_STABILITY_COLOUR} ne 0 |
34 | and ((-t STDOUT and length $ENV{TERM}) or $ENV{PERL_CANARY_STABILITY_COLOUR}) |
35 | and ((-t STDOUT and length $ENV{TERM}) or $ENV{PERL_CANARY_STABILITY_COLOUR}) |
35 | and print "\e[$_[0]m"; |
36 | and print "\e[$_[0]m"; |
36 | } |
37 | } |