API->use_the_new_way; my @result; if (wantarray) { @result = $func->(@_); } else { $result[0] = $func->(@_); } API->go_back_to_the_old_way; return wantarray ? @result : $result[0];