1 | =head1 NAME |
1 | =head1 NAME |
2 | |
2 | |
3 | Canary::Stability - to be done |
3 | Canary::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 | |
11 | This is just a placeholder module, to be filled in later. |
12 | This module is used by Schmorp's modules during configuration stage to |
|
|
13 | test the installed perl for compatibility with his modules. |
12 | |
14 | |
13 | =over 4 |
15 | It's not, at this stage, meant as a tool for other module authors, |
|
|
16 | although in principle nothing prevents them from subscribing to the same |
|
|
17 | ideas. |
|
|
18 | |
|
|
19 | See the F<Makefile.PL> in L<Coro> or L<AnyEvent> for usage examples. |
14 | |
20 | |
15 | =cut |
21 | =cut |
16 | |
22 | |
17 | package Canary::Stability; |
23 | package Canary::Stability; |
18 | |
24 | |
19 | BEGIN { |
25 | BEGIN { |
20 | $VERSION = 2001; |
26 | $VERSION = 2006; |
21 | } |
27 | } |
22 | |
28 | |
23 | sub sgr { |
29 | sub 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 |
… | |
… | |
83 | *** All should be well, and if it isn't, you should report this as a bug |
89 | *** All should be well, and if it isn't, you should report this as a bug |
84 | *** to the $distname author. |
90 | *** to the $distname author. |
85 | *** |
91 | *** |
86 | |
92 | |
87 | EOF |
93 | EOF |
88 | } elsif ($] <= 5.020) { |
94 | } elsif ($] < 5.021) { |
89 | #sgr 32; |
95 | #sgr 32; |
90 | print <<EOF; |
96 | print <<EOF; |
91 | |
97 | |
92 | *** |
98 | *** |
93 | *** The stability canary says: chirp! chirp! (it seems to be quite happy) |
99 | *** The stability canary says: chirp! chirp! (it seems to be quite happy) |
… | |
… | |
136 | *** |
142 | *** |
137 | *** How can I skip this prompt on automated installs? |
143 | *** How can I skip this prompt on automated installs? |
138 | *** Set PERL_CANARY_STABILITY_NOPROMPT=1 in your environment. |
144 | *** Set PERL_CANARY_STABILITY_NOPROMPT=1 in your environment. |
139 | *** More info is in the Canary::Stability manpage. |
145 | *** More info is in the Canary::Stability manpage. |
140 | *** |
146 | *** |
141 | *** Long version of this FAQ: http://stabilityperl.schmorp.de/faq.html |
147 | *** Long version of this FAQ: http://stableperl.schmorp.de/faq.html |
142 | *** Stability Branch homepage: http://stabilityperl.schmorp.de/ |
148 | *** Stability Branch homepage: http://stableperl.schmorp.de/ |
143 | *** |
149 | *** |
144 | |
150 | |
145 | EOF |
151 | EOF |
146 | |
152 | |
147 | unless ($ENV{PERL_CANARY_STABILITY_NOPROMPT}) { |
153 | unless ($ENV{PERL_CANARY_STABILITY_NOPROMPT}) { |
… | |
… | |
178 | =back |
184 | =back |
179 | |
185 | |
180 | =head1 AUTHOR |
186 | =head1 AUTHOR |
181 | |
187 | |
182 | Marc Lehmann <schmorp@schmorp.de> |
188 | Marc Lehmann <schmorp@schmorp.de> |
183 | http://home.schmorp.de/ |
189 | http://software.schmorp.de/pkg/Canary-Stability.html |
184 | |
190 | |
185 | =cut |
191 | =cut |
186 | |
192 | |
187 | 1 |
193 | 1 |
188 | |
194 | |