… | |
… | |
21 | =cut |
21 | =cut |
22 | |
22 | |
23 | package Canary::Stability; |
23 | package Canary::Stability; |
24 | |
24 | |
25 | BEGIN { |
25 | BEGIN { |
26 | $VERSION = 2001; |
26 | $VERSION = 2006; |
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 | } |
… | |
… | |
89 | *** All should be well, and if it isn't, you should report this as a bug |
90 | *** All should be well, and if it isn't, you should report this as a bug |
90 | *** to the $distname author. |
91 | *** to the $distname author. |
91 | *** |
92 | *** |
92 | |
93 | |
93 | EOF |
94 | EOF |
94 | } elsif ($] <= 5.020) { |
95 | } elsif ($] < 5.021) { |
95 | #sgr 32; |
96 | #sgr 32; |
96 | print <<EOF; |
97 | print <<EOF; |
97 | |
98 | |
98 | *** |
99 | *** |
99 | *** The stability canary says: chirp! chirp! (it seems to be quite happy) |
100 | *** The stability canary says: chirp! chirp! (it seems to be quite happy) |
… | |
… | |
184 | =back |
185 | =back |
185 | |
186 | |
186 | =head1 AUTHOR |
187 | =head1 AUTHOR |
187 | |
188 | |
188 | Marc Lehmann <schmorp@schmorp.de> |
189 | Marc Lehmann <schmorp@schmorp.de> |
189 | http://home.schmorp.de/ |
190 | http://software.schmorp.de/pkg/Canary-Stability.html |
190 | |
191 | |
191 | =cut |
192 | =cut |
192 | |
193 | |
193 | 1 |
194 | 1 |
194 | |
195 | |