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.3 by root, Thu Jun 4 23:49:11 2015 UTC vs.
Revision 1.7 by root, Mon Jun 29 00:02:01 2015 UTC

1=head1 NAME 1=head1 NAME
2 2
3Canary::Stability - to be done 3Canary::Stability - canary to check perl compatibility for schmorp's modules
4 4
5=head1 SYNOPSIS 5=head1 SYNOPSIS
6 6
7 use Canary::Stability; 7 # in Makefile.PL
8 use Canary::Stability DISTNAME => 2001, MINIMUM_PERL_VERSION;
8 9
9=head1 DESCRIPTION 10=head1 DESCRIPTION
10 11
11This is just a placeholder module, to be filled in later. 12This module is used by Schmorp's modules during configuration stage to
13test the installed perl for compatibility with his modules.
12 14
13=over 4 15It's not, at this stage, meant as a tool for other module authors,
16although in principle nothing prevents them from subscribing to the same
17ideas.
18
19See the F<Makefile.PL> in L<Coro> or L<AnyEvent> for usage examples.
14 20
15=cut 21=cut
16 22
17package Canary::Stability; 23package Canary::Stability;
18 24
19BEGIN { 25BEGIN {
20 $VERSION = 2001; 26 $VERSION = 2006;
21} 27}
22 28
23sub sgr { 29sub sgr {
24 # we just assume ANSI almost everywhere 30 # we just assume ANSI almost everywhere
25 # red 31, yellow 33, green 32 31 # red 31, yellow 33, green 32
32 local $| = 1;
26 33
27 $ENV{PERL_CANARY_STABILITY_COLOUR} ne 0 34 $ENV{PERL_CANARY_STABILITY_COLOUR} ne 0
28 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})
29 and print "\e[$_[0]m"; 36 and print "\e[$_[0]m";
30} 37}
83*** 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
84*** to the $distname author. 91*** to the $distname author.
85*** 92***
86 93
87EOF 94EOF
88 } elsif ($] <= 5.020) { 95 } elsif ($] < 5.021) {
89 #sgr 32; 96 #sgr 32;
90 print <<EOF; 97 print <<EOF;
91 98
92*** 99***
93*** 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)
136*** 143***
137*** How can I skip this prompt on automated installs? 144*** How can I skip this prompt on automated installs?
138*** Set PERL_CANARY_STABILITY_NOPROMPT=1 in your environment. 145*** Set PERL_CANARY_STABILITY_NOPROMPT=1 in your environment.
139*** More info is in the Canary::Stability manpage. 146*** More info is in the Canary::Stability manpage.
140*** 147***
141*** Long version of this FAQ: http://stabilityperl.schmorp.de/faq.html 148*** Long version of this FAQ: http://stableperl.schmorp.de/faq.html
142*** Stability Branch homepage: http://stabilityperl.schmorp.de/ 149*** Stability Branch homepage: http://stableperl.schmorp.de/
143*** 150***
144 151
145EOF 152EOF
146 153
147 unless ($ENV{PERL_CANARY_STABILITY_NOPROMPT}) { 154 unless ($ENV{PERL_CANARY_STABILITY_NOPROMPT}) {
178=back 185=back
179 186
180=head1 AUTHOR 187=head1 AUTHOR
181 188
182 Marc Lehmann <schmorp@schmorp.de> 189 Marc Lehmann <schmorp@schmorp.de>
183 http://home.schmorp.de/ 190 http://software.schmorp.de/pkg/Canary-Stability.html
184 191
185=cut 192=cut
186 193
1871 1941
188 195

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines