These give warnings in Perl >= 5.18:
given is experimental at /home/hydra/src/hydra/src/lib/Hydra/Helper/CatalystUtils.pm line 241. when is experimental at /home/hydra/src/hydra/src/lib/Hydra/Helper/CatalystUtils.pm line 242. …
MRJCQ4EO525TGAZFHIHPXH3WHNH3BFPEO2XBZTJ7EJJZHNP7EV5AC
RPTSGIRCCSEDEBRB5H465A5JULJH5KFYAMR573SKNTPSJSCYEICQC
Z52T2BC4CTXQGBXPW4VZF5A5W67KDJ65RUBCM7MWHUNPMI6XLQCQC
THUMRES3YYSVMQUJVIF7KWGJAOWVKJ3T5TDBOZIDW63RSHZ57SKQC
OOQ2D3KCLFPYNAN253PHWLBQMB6OMO2KYQWQXLTP65SQAYZWQ5LAC
3XTHEUMP2ZOMPQWE3S5QWHIHCEJNEXGDPQB3JUVZFPS3RFMY455QC
QMW24O5S43MYF5ZTBULUEZNDW2FKJ3QP2GL46P6B2SVGSQLVEACAC
PGSSRA7CPOQI354Y6YJTYRFF57YJARB5THFE3MBJBVHOLYNEIGTQC
JAH3UPWAVSHXIPNGL6PROQPZBYZHPJNFONWBDZX4HCX646USZXUQC
R4MHON3OOHV63YGRIDHNAV6ZQN7QKAHPRNQUXLIYGC25OUKZ43SQC
7UJ5YV4VUSXMKB57KKXDG6KLIXMQXO45VO5UTOT46BHQJBFZ7XKQC
LBNVQXUBEZ45SOTGVXK5UEZXIAIZTJLWZNUYFI4JZ6J65N3KPDVQC
PCKLFRT5IZVLG47GQQ23GBSROKUR4CUEZW4PRVGREHNDFTCZ7VBAC
N22GPKYTOLZLBGTGDATQDVZ4R5APZEAOIA7L32X4UXBH4XNI7MWAC
POPU2ATH2HHBTGHKRAV3EY2K55P664IARI3YJGLDKVJ6PQPXBQ4AC
given ($alt->{type}) {
when ("string") {
push @res, "--argstr", $input, $alt->{value};
}
when ("boolean") {
push @res, "--arg", $input, booleanToString($exprType, $alt->{value});
}
when ("nix") {
die "input type ‘nix’ only supported for Nix-based jobsets\n" unless $exprType eq "nix";
push @res, "--arg", $input, $alt->{value};
}
when ("eval") {
die "input type ‘eval’ only supported for Nix-based jobsets\n" unless $exprType eq "nix";
my $s = "{ ";
# FIXME: escape $_. But dots should not be escaped.
$s .= "$_ = builtins.storePath ${\$alt->{jobs}->{$_}}; "
foreach keys %{$alt->{jobs}};
$s .= "}";
push @res, "--arg", $input, $s;
}
default {
push @res, "--arg", $input, buildInputToString($exprType, $alt);
}
}
if ($alt->{type} eq "string") {
push @res, "--argstr", $input, $alt->{value};
}
elsif ($alt->{type} eq "boolean") {
push @res, "--arg", $input, booleanToString($exprType, $alt->{value});
}
elsif ($alt->{type} eq "nix") {
die "input type ‘nix’ only supported for Nix-based jobsets\n" unless $exprType eq "nix";
push @res, "--arg", $input, $alt->{value};
}
elsif ($alt->{type} eq "eval") {
die "input type ‘eval’ only supported for Nix-based jobsets\n" unless $exprType eq "nix";
my $s = "{ ";
# FIXME: escape $_. But dots should not be escaped.
$s .= "$_ = builtins.storePath ${\$alt->{jobs}->{$_}}; "
foreach keys %{$alt->{jobs}};
$s .= "}";
push @res, "--arg", $input, $s;
}
else {
push @res, "--arg", $input, buildInputToString($exprType, $alt);
}
given ($build->buildstatus) {
when (0) { $status = "Success"; }
when (1) { $status = "Failed"; }
when (2) { $status = "Dependency failed"; }
when (4) { $status = "Cancelled"; }
when (6) { $status = "Failed with output"; }
}
if ($build->buildstatus == 0) { $status = "Success"; }
elsif ($build->buildstatus == 1) { $status = "Failed"; }
elsif ($build->buildstatus == 2) { $status = "Dependency failed"; }
elsif ($build->buildstatus == 4) { $status = "Cancelled"; }
elsif ($build->buildstatus == 6) { $status = "Failed with output"; }
given ($ext) {
when ('.xz') { $mimetype = "application/x-xz"; }
when ('.lzma') { $mimetype = "application/x-xz"; }
when ('.zip') { $mimetype = "application/zip"; }
when ('.bz2') { $mimetype = "application/x-bzip2"; }
when ('.tgz') { $mimetype = "application/x-gzip"; }
default { die "couldn't parse extension of $covTarball"; }
}
if ($ext eq '.xz') { $mimetype = "application/x-xz"; }
elsif ($ext eq '.lzma') { $mimetype = "application/x-xz"; }
elsif ($ext eq '.zip') { $mimetype = "application/zip"; }
elsif ($ext eq '.bz2') { $mimetype = "application/x-bzip2"; }
elsif ($ext eq '.tgz') { $mimetype = "application/x-gzip"; }
else { die "couldn't parse extension of $covTarball"; }