Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Don't use the Switch module

It was removed in Perl 5.14.
  • Loading branch information...
commit f92a143c5f5a9acd1c995a3e640e44c56fd16230 1 parent 3eeb035
@edolstra edolstra authored
Showing with 6 additions and 6 deletions.
  1. +6 −6 src/script/hydra-build
View
12 src/script/hydra-build
@@ -17,7 +17,7 @@ use Text::Table;
use POSIX qw(strftime);
use Net::Twitter::Lite;
use Data::Dump qw(dump);
-use Switch;
+use feature qw/switch/;
STDOUT->autoflush();
@@ -61,11 +61,11 @@ sub statusDescription {
my ($buildstatus) = @_;
my $status = "Failed";
- switch ($buildstatus) {
- case 0 { $status = "Success"; }
- case 1 { $status = "Failed with non-zero exit code"; }
- case 2 { $status = "Dependency failed"; }
- case 4 { $status = "Cancelled"; }
+ given ($buildstatus) {
+ when (0) { $status = "Success"; }
+ when (1) { $status = "Failed with non-zero exit code"; }
+ when (2) { $status = "Dependency failed"; }
+ when (4) { $status = "Cancelled"; }
}
return $status;
Please sign in to comment.
Something went wrong with that request. Please try again.