A quick note: I think this mostly supersedes @andreyorst 's if-then-else technique, because
def some-function-using-if_then_else -params 3 %{
try %{
"mypkg-str-literal-true-%arg{1}"
# IF PART
echo -debug %arg{2}
} catch %{
# ELSE PART
echo -debug %arg{3}
}
}
can evaluate its arguments. If- and else- strings, OTOH, if passed to an if
function, would be evaluated in that function’s context, so %arg
's would be nonsense — and access to the original args would need to be arranged via saving them in an option.