From a4cda5e337d0a75328047821cdaa478d78a39e9a Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Mon, 12 Mar 2012 20:41:45 +0100 Subject: [PATCH] Don't use the Switch module It was removed in Perl 5.14. --- src/script/hydra-build | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/script/hydra-build b/src/script/hydra-build index 0a54096c..60e27e64 100755 --- a/src/script/hydra-build +++ b/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;