Re: [pve-devel] [PATCH storage 06/26] common: use v5.36

Thomas Lamprecht
2025-07-29T14:41:24Z

Am 29.07.25 um 15:59 schrieb Fiona Ebner:
>> diff --git a/src/PVE/Storage/Common.pm b/src/PVE/Storage/Common.pm
>> index 746a262..222dc76 100644
>> --- a/src/PVE/Storage/Common.pm
>> +++ b/src/PVE/Storage/Common.pm
>> @@ -1,7 +1,6 @@
>> package PVE::Storage::Common;
>>
>> -use strict;
>> -use warnings;
>> +use v5.36;
>>
>> use PVE::JSONSchema;
>> use PVE::Syscall;
> Do you need a specific feature from v5.36? Would be great to have some
> context. And should we go for v5.40, since that's what we have in
> Trixie? Or are there any reservations about specific language changes?
>

Yes, this should have been stated in the commit message, but effectively:
5.36 allows us to use signatures (and makes enabling warnings/strict obsolete,
so one line less in total) while ensuring we can backport anything to
PVE 8 without having to adapt patches, as it cannot use v5.40.

That's a big reason behind the best practice of only raising lower limits
as high as really necessary for something to be usable.

Having real signatures available, inclusive support for default values,
is definitively worth it, and as PVE 7 is EOL since over a year we can
rather safely use v5.36.