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.2 by root, Thu Jun 4 16:18:26 2015 UTC vs.
Revision 1.3 by root, Thu Jun 4 23:49:11 2015 UTC

15=cut 15=cut
16 16
17package Canary::Stability; 17package Canary::Stability;
18 18
19BEGIN { 19BEGIN {
20 $VERSION = 2001; # the year perl was accomodating enough to developers to foster weird ideas such as Coro 20 $VERSION = 2001;
21} 21}
22 22
23sub sgr { 23sub sgr {
24 # we just assume ANSI almost everywhere 24 # we just assume ANSI almost everywhere
25
26 # red 31, yellow 33, green 32 25 # red 31, yellow 33, green 32
27 26
28 $ENV{PERL_CANARY_STABILITY_COLOUR} ne 0 27 $ENV{PERL_CANARY_STABILITY_COLOUR} ne 0
29 and ((-t STDOUT and length $ENV{TERM}) or $ENV{PERL_CANARY_STABILITY_COLOUR}) 28 and ((-t STDOUT and length $ENV{TERM}) or $ENV{PERL_CANARY_STABILITY_COLOUR})
30 and print "\e[$_[0]m"; 29 and print "\e[$_[0]m";
41 if ($minvers > $VERSION) { 40 if ($minvers > $VERSION) {
42 sgr 33; 41 sgr 33;
43 print <<EOF; 42 print <<EOF;
44 43
45*** 44***
46*** The stability canary says: (nothing, he died of old age). 45*** The stability canary says: (nothing, it died of old age).
47*** 46***
48*** Your Canary::Stability module (used by $distname) is too old. 47*** Your Canary::Stability module (used by $distname) is too old.
49*** This is not a fatal problem - while you might want to upgrade to version 48*** This is not a fatal problem - while you might want to upgrade to version
50*** $minvers (currently installed version: $VERSION) to get better support 49*** $minvers (currently installed version: $VERSION) to get better support
51*** status testing, you might also not want to care at all, and all will 50*** status testing, you might also not want to care at all, and all will
58 57
59 sgr 33; 58 sgr 33;
60 print <<EOF; 59 print <<EOF;
61 60
62*** 61***
63*** The stability canary says: chirp... (it seems a bit unhappy). 62*** The stability canary says: chirp (it seems concerned about something).
64*** 63***
65*** Your perl version ($]) is older than the $distname distribution 64*** Your perl version ($]) is older than the $distname distribution
66*** likes ($minperl). This is not a fatal problem - the module might work 65*** likes ($minperl). This is not a fatal problem - the module might work
67*** well with your version of perl, but it does mean the author likely 66*** well with your version of perl, but it does mean the author likely
68*** won't do anything to make it wokr if it breaks. 67*** won't do anything to make it work if it breaks.
69*** 68***
70 69
71EOF 70EOF
72 } elsif (defined $Internals::StabilityBranchVersion) { 71 } elsif (defined $Internals::StabilityBranchVersion) {
73 # note to people studying this modules sources: 72 # note to people studying this modules sources:
84*** All should be well, and if it isn't, you should report this as a bug 83*** All should be well, and if it isn't, you should report this as a bug
85*** to the $distname author. 84*** to the $distname author.
86*** 85***
87 86
88EOF 87EOF
89 } elsif ($] <= 4.020) { 88 } elsif ($] <= 5.020) {
90 sgr 32; 89 #sgr 32;
91 print <<EOF; 90 print <<EOF;
92 91
93*** 92***
94*** The stability canary says: chirp! chirp! (it seems to be quite happy) 93*** The stability canary says: chirp! chirp! (it seems to be quite happy)
95*** 94***

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines