From f28f89720b555c03cf26753e16b385706fe8bc59 Mon Sep 17 00:00:00 2001 From: Todd Zullinger Date: Mon, 28 Jul 2025 22:04:29 -0400 Subject: [PATCH] modperl: avoid newAV_alloc_x which requires perl >= 5.35.1 Use of newAV_alloc_x() was added in a7dffb8f (Add modperl support for sasl, 2025-03-16), but it has the unintended consequence of increasing the minimum Perl version a bit more than desired. Replace it with the roughly equivalent code as documented in perlapi(1), which can be read online at . Fix #1966 --- modules/modperl/modperl.i | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/modperl/modperl.i b/modules/modperl/modperl.i index 25f04d39..fdea7638 100644 --- a/modules/modperl/modperl.i +++ b/modules/modperl/modperl.i @@ -82,7 +82,9 @@ namespace std { return i != self->end(); } SV* keys_() { - AV* av = newAV_alloc_x(self->size()); + // TODO: switch to newAV_alloc_x, requires perl 5.35.1 + AV *av = newAV(); + av_extend(av, self->size()); // assume SCString int i = 0; for (const auto& a : *self) {