forked from lix-project/hydra
Don't use the Switch module
It was removed in Perl 5.14.
This commit is contained in:
parent
87e4d43848
commit
a4cda5e337
|
@ -17,7 +17,7 @@ use Text::Table;
|
||||||
use POSIX qw(strftime);
|
use POSIX qw(strftime);
|
||||||
use Net::Twitter::Lite;
|
use Net::Twitter::Lite;
|
||||||
use Data::Dump qw(dump);
|
use Data::Dump qw(dump);
|
||||||
use Switch;
|
use feature qw/switch/;
|
||||||
|
|
||||||
STDOUT->autoflush();
|
STDOUT->autoflush();
|
||||||
|
|
||||||
|
@ -61,11 +61,11 @@ sub statusDescription {
|
||||||
my ($buildstatus) = @_;
|
my ($buildstatus) = @_;
|
||||||
|
|
||||||
my $status = "Failed";
|
my $status = "Failed";
|
||||||
switch ($buildstatus) {
|
given ($buildstatus) {
|
||||||
case 0 { $status = "Success"; }
|
when (0) { $status = "Success"; }
|
||||||
case 1 { $status = "Failed with non-zero exit code"; }
|
when (1) { $status = "Failed with non-zero exit code"; }
|
||||||
case 2 { $status = "Dependency failed"; }
|
when (2) { $status = "Dependency failed"; }
|
||||||
case 4 { $status = "Cancelled"; }
|
when (4) { $status = "Cancelled"; }
|
||||||
}
|
}
|
||||||
|
|
||||||
return $status;
|
return $status;
|
||||||
|
|
Loading…
Reference in a new issue