… | |
… | |
16 | although in principle nothing prevents them from subscribing to the same |
16 | although in principle nothing prevents them from subscribing to the same |
17 | ideas. |
17 | ideas. |
18 | |
18 | |
19 | See the F<Makefile.PL> in L<Coro> or L<AnyEvent> for usage examples. |
19 | See the F<Makefile.PL> in L<Coro> or L<AnyEvent> for usage examples. |
20 | |
20 | |
21 | =over 4 |
|
|
22 | |
|
|
23 | =cut |
21 | =cut |
24 | |
22 | |
25 | package Canary::Stability; |
23 | package Canary::Stability; |
26 | |
24 | |
27 | BEGIN { |
25 | BEGIN { |
28 | $VERSION = 2001; |
26 | $VERSION = 2006; |
29 | } |
27 | } |
30 | |
28 | |
31 | sub sgr { |
29 | sub sgr { |
32 | # we just assume ANSI almost everywhere |
30 | # we just assume ANSI almost everywhere |
33 | # red 31, yellow 33, green 32 |
31 | # red 31, yellow 33, green 32 |
|
|
32 | local $| = 1; |
34 | |
33 | |
35 | $ENV{PERL_CANARY_STABILITY_COLOUR} ne 0 |
34 | $ENV{PERL_CANARY_STABILITY_COLOUR} ne 0 |
36 | 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}) |
37 | and print "\e[$_[0]m"; |
36 | and print "\e[$_[0]m"; |
38 | } |
37 | } |
… | |
… | |
91 | *** 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 |
92 | *** to the $distname author. |
91 | *** to the $distname author. |
93 | *** |
92 | *** |
94 | |
93 | |
95 | EOF |
94 | EOF |
96 | } elsif ($] <= 5.020) { |
95 | } elsif ($] < 5.021) { |
97 | #sgr 32; |
96 | #sgr 32; |
98 | print <<EOF; |
97 | print <<EOF; |
99 | |
98 | |
100 | *** |
99 | *** |
101 | *** 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) |
… | |
… | |
144 | *** |
143 | *** |
145 | *** How can I skip this prompt on automated installs? |
144 | *** How can I skip this prompt on automated installs? |
146 | *** Set PERL_CANARY_STABILITY_NOPROMPT=1 in your environment. |
145 | *** Set PERL_CANARY_STABILITY_NOPROMPT=1 in your environment. |
147 | *** More info is in the Canary::Stability manpage. |
146 | *** More info is in the Canary::Stability manpage. |
148 | *** |
147 | *** |
149 | *** Long version of this FAQ: http://stabilityperl.schmorp.de/faq.html |
148 | *** Long version of this FAQ: http://stableperl.schmorp.de/faq.html |
150 | *** Stability Branch homepage: http://stabilityperl.schmorp.de/ |
149 | *** Stability Branch homepage: http://stableperl.schmorp.de/ |
151 | *** |
150 | *** |
152 | |
151 | |
153 | EOF |
152 | EOF |
154 | |
153 | |
155 | unless ($ENV{PERL_CANARY_STABILITY_NOPROMPT}) { |
154 | unless ($ENV{PERL_CANARY_STABILITY_NOPROMPT}) { |
… | |
… | |
186 | =back |
185 | =back |
187 | |
186 | |
188 | =head1 AUTHOR |
187 | =head1 AUTHOR |
189 | |
188 | |
190 | Marc Lehmann <schmorp@schmorp.de> |
189 | Marc Lehmann <schmorp@schmorp.de> |
191 | http://home.schmorp.de/ |
190 | http://software.schmorp.de/pkg/Canary-Stability.html |
192 | |
191 | |
193 | =cut |
192 | =cut |
194 | |
193 | |
195 | 1 |
194 | 1 |
196 | |
195 | |