3 ms·
Oh I've used these plenty but there are still conditionals which sometimes require or are most clearly defined with if statements, particularly complex redirect
by nkozyra 5y ago
Oh I've used these plenty but there are still conditionals which sometimes require or are most clearly defined with if statements, particularly complex redirects that rely on a number of individual conditions to be met.
I've seen these manifest in the wild as stuff like:
if ($thing ~* (match)) {
$setWeirdVar = "Y";
}
if ($otherThing = "value") {
set $setValue "${setWeirdVar}E";
}
if ($thirdCondition ~ (another|match)) {
set $setValue "${setWeirdVar}S";
}
if ($setValue = YES) {
# do a thing here
}
As clunky as that is, I've found it recommended in SO threads.