ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/Canary-Stability/Stability.pm
(Generate patch)

Comparing Canary-Stability/Stability.pm (file contents):
Revision 1.4 by root, Fri Jun 5 00:39:05 2015 UTC vs.
Revision 1.7 by root, Mon Jun 29 00:02:01 2015 UTC

16although in principle nothing prevents them from subscribing to the same 16although in principle nothing prevents them from subscribing to the same
17ideas. 17ideas.
18 18
19See the F<Makefile.PL> in L<Coro> or L<AnyEvent> for usage examples. 19See 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
25package Canary::Stability; 23package Canary::Stability;
26 24
27BEGIN { 25BEGIN {
28 $VERSION = 2001; 26 $VERSION = 2006;
29} 27}
30 28
31sub sgr { 29sub 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
95EOF 94EOF
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
153EOF 152EOF
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
1951 1941
196 195

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines