* [PATCH network/perl-rs/proxmox 0/3] perl: enable strict and warnings in modules that lack them
@ 2026-10-15 15:42 Lukas Sichert
2026-10-15 15:42 ` [PATCH network 1/3] api: zones: enable strict and warnings Lukas Sichert
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Lukas Sichert @ 2026-10-15 15:42 UTC (permalink / raw)
To: pve-devel; +Cc: Lukas Sichert
A scan of the perl modules in these repositories found a few that
enable neither 'use v5.36' nor 'use strict' and 'use warnings'. Enable
them to adhere to the style guide and so that mistakes such as typos
in variable names or uses of undefined values do not go unnoticed.
The Fixup.pm files in pve-rs and pmg-rs are intentionally left alone.
They are not modules of their own, but snippets that perlmod's
genpackage.pl inserts into the generated Proxmox::Lib::PVE and
Proxmox::Lib::PMG right after the 'use strict; use warnings;' of its
template, so they already run under both pragmas.
Testing:
- proxmox: running 'make refresh' in pve-api-types before and after the
change generates identical output and identical stderr.
- proxmox-perl-rs: generated the Proxmox::RS::* modules by running
'make Proxmox/RS' in common/pkg and loaded Proxmox::RS::CalendarEvent
and PVE::RS::CalendarEvent with warnings made fatal using 'perl -e'.
Loading CalendarEvent runs Proxmox::Lib::Common, and neither errors
nor warnings were reported.
- pve-network: I installed the patched package on a test node and
played around with the zones. I noticed the error messages
'INTERFACE_STATE: Cannot find IF vrf_evpn45 in VRF 20' and 'Cannot
process L3VNI 45 Del: Could not find BGP instance'. These messages
were already present before this series and are therefore not caused
by the added pragmas.
network:
Lukas Sichert (1):
api: zones: enable strict and warnings
src/PVE/API2/Network/SDN/Nodes/Zones.pm | 3 +++
1 file changed, 3 insertions(+)
perl-rs:
Lukas Sichert (1):
common: enable strict and warnings in perl package modules
common/pkg/PVE/RS/CalendarEvent.pm | 3 +++
common/pkg/Proxmox/Lib/Common.pm | 3 +++
2 files changed, 6 insertions(+)
proxmox:
Lukas Sichert (1):
pve-api-types: enable strict and warnings in Bool
pve-api-types/generator-lib/Bool.pm | 3 +++
1 file changed, 3 insertions(+)
Summary over all repositories:
4 files changed, 12 insertions(+), 0 deletions(-)
--
Generated by murpp 0.12.0
^ permalink raw reply [flat|nested] 5+ messages in thread* [PATCH network 1/3] api: zones: enable strict and warnings
2026-10-15 15:42 [PATCH network/perl-rs/proxmox 0/3] perl: enable strict and warnings in modules that lack them Lukas Sichert
@ 2026-10-15 15:42 ` Lukas Sichert
2026-10-15 15:42 ` [PATCH perl-rs 2/3] common: enable strict and warnings in perl package modules Lukas Sichert
2026-10-15 15:42 ` [PATCH proxmox 3/3] pve-api-types: enable strict and warnings in Bool Lukas Sichert
2 siblings, 0 replies; 5+ messages in thread
From: Lukas Sichert @ 2026-10-15 15:42 UTC (permalink / raw)
To: pve-devel; +Cc: Lukas Sichert
The Proxmox style guide requires every perl module to enable both
pragmas, but this one did not. Without them, typos in variable names
and uses of undefined values in this module go unnoticed instead of
being reported.
Signed-off-by: Lukas Sichert <l.sichert@proxmox.com>
---
src/PVE/API2/Network/SDN/Nodes/Zones.pm | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/PVE/API2/Network/SDN/Nodes/Zones.pm b/src/PVE/API2/Network/SDN/Nodes/Zones.pm
index b92be6a..db94b8f 100644
--- a/src/PVE/API2/Network/SDN/Nodes/Zones.pm
+++ b/src/PVE/API2/Network/SDN/Nodes/Zones.pm
@@ -1,5 +1,8 @@
package PVE::API2::Network::SDN::Nodes::Zones;
+use strict;
+use warnings;
+
use PVE::API2::Network::SDN::Nodes::Zone;
use PVE::INotify;
use PVE::JSONSchema qw(get_standard_option);
--
2.47.3
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH perl-rs 2/3] common: enable strict and warnings in perl package modules
2026-10-15 15:42 [PATCH network/perl-rs/proxmox 0/3] perl: enable strict and warnings in modules that lack them Lukas Sichert
2026-10-15 15:42 ` [PATCH network 1/3] api: zones: enable strict and warnings Lukas Sichert
@ 2026-10-15 15:42 ` Lukas Sichert
2026-10-16 13:43 ` Wolfgang Bumiller
2026-10-15 15:42 ` [PATCH proxmox 3/3] pve-api-types: enable strict and warnings in Bool Lukas Sichert
2 siblings, 1 reply; 5+ messages in thread
From: Lukas Sichert @ 2026-10-15 15:42 UTC (permalink / raw)
To: pve-devel; +Cc: Lukas Sichert
The Proxmox style guide requires every perl module to enable both
pragmas, but PVE::RS::CalendarEvent and Proxmox::Lib::Common did not.
Signed-off-by: Lukas Sichert <l.sichert@proxmox.com>
---
common/pkg/PVE/RS/CalendarEvent.pm | 3 +++
common/pkg/Proxmox/Lib/Common.pm | 3 +++
2 files changed, 6 insertions(+)
diff --git a/common/pkg/PVE/RS/CalendarEvent.pm b/common/pkg/PVE/RS/CalendarEvent.pm
index 3a5f66e..47946f8 100644
--- a/common/pkg/PVE/RS/CalendarEvent.pm
+++ b/common/pkg/PVE/RS/CalendarEvent.pm
@@ -1,3 +1,6 @@
+use strict;
+use warnings;
+
use base 'Proxmox::RS::CalendarEvent';
# Compat, Deprecated!
1
diff --git a/common/pkg/Proxmox/Lib/Common.pm b/common/pkg/Proxmox/Lib/Common.pm
index 1e6b26d..1074050 100644
--- a/common/pkg/Proxmox/Lib/Common.pm
+++ b/common/pkg/Proxmox/Lib/Common.pm
@@ -22,6 +22,9 @@ whichever was loaded.
=cut
+use strict;
+use warnings;
+
use vars qw(@ISA);
sub library {
--
2.47.3
^ permalink raw reply related [flat|nested] 5+ messages in thread* Re: [PATCH perl-rs 2/3] common: enable strict and warnings in perl package modules
2026-10-15 15:42 ` [PATCH perl-rs 2/3] common: enable strict and warnings in perl package modules Lukas Sichert
@ 2026-10-16 13:43 ` Wolfgang Bumiller
0 siblings, 0 replies; 5+ messages in thread
From: Wolfgang Bumiller @ 2026-10-16 13:43 UTC (permalink / raw)
To: Lukas Sichert; +Cc: pve-devel
On Thu, Oct 15, 2026 at 05:42:40PM +0200, Lukas Sichert wrote:
> The Proxmox style guide requires every perl module to enable both
> pragmas, but PVE::RS::CalendarEvent and Proxmox::Lib::Common did not.
>
> Signed-off-by: Lukas Sichert <l.sichert@proxmox.com>
> ---
> common/pkg/PVE/RS/CalendarEvent.pm | 3 +++
> common/pkg/Proxmox/Lib/Common.pm | 3 +++
> 2 files changed, 6 insertions(+)
>
> diff --git a/common/pkg/PVE/RS/CalendarEvent.pm b/common/pkg/PVE/RS/CalendarEvent.pm
> index 3a5f66e..47946f8 100644
> --- a/common/pkg/PVE/RS/CalendarEvent.pm
> +++ b/common/pkg/PVE/RS/CalendarEvent.pm
> @@ -1,3 +1,6 @@
> +use strict;
> +use warnings;
> +
This is rather useless in this file.
This is a deprecated file of which the last user, as far as I can tell,
was fixed 4 years ago, so we should delete it instead.
> use base 'Proxmox::RS::CalendarEvent';
> # Compat, Deprecated!
> 1
> diff --git a/common/pkg/Proxmox/Lib/Common.pm b/common/pkg/Proxmox/Lib/Common.pm
> index 1e6b26d..1074050 100644
> --- a/common/pkg/Proxmox/Lib/Common.pm
> +++ b/common/pkg/Proxmox/Lib/Common.pm
> @@ -22,6 +22,9 @@ whichever was loaded.
>
> =cut
>
> +use strict;
> +use warnings;
> +
> use vars qw(@ISA);
>
> sub library {
> --
> 2.47.3
>
>
>
>
>
--
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH proxmox 3/3] pve-api-types: enable strict and warnings in Bool
2026-10-15 15:42 [PATCH network/perl-rs/proxmox 0/3] perl: enable strict and warnings in modules that lack them Lukas Sichert
2026-10-15 15:42 ` [PATCH network 1/3] api: zones: enable strict and warnings Lukas Sichert
2026-10-15 15:42 ` [PATCH perl-rs 2/3] common: enable strict and warnings in perl package modules Lukas Sichert
@ 2026-10-15 15:42 ` Lukas Sichert
2 siblings, 0 replies; 5+ messages in thread
From: Lukas Sichert @ 2026-10-15 15:42 UTC (permalink / raw)
To: pve-devel; +Cc: Lukas Sichert
The Proxmox style guide requires every perl module to enable both
pragmas, but Bool.pm did not. Enable them so that mistakes made when
extending the module are reported instead of silently ignored.
Signed-off-by: Lukas Sichert <l.sichert@proxmox.com>
---
pve-api-types/generator-lib/Bool.pm | 3 +++
1 file changed, 3 insertions(+)
diff --git a/pve-api-types/generator-lib/Bool.pm b/pve-api-types/generator-lib/Bool.pm
index 12a4e156..ac242592 100644
--- a/pve-api-types/generator-lib/Bool.pm
+++ b/pve-api-types/generator-lib/Bool.pm
@@ -1,5 +1,8 @@
package Bool;
+use strict;
+use warnings;
+
use base 'Exporter';
use overload
'!' => sub { bool(!$_[0]->$*) },
--
2.47.3
^ permalink raw reply related [flat|nested] 5+ messages in thread
end of thread, other threads:[~2026-10-16 13:43 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-15 15:42 [PATCH network/perl-rs/proxmox 0/3] perl: enable strict and warnings in modules that lack them Lukas Sichert
2026-10-15 15:42 ` [PATCH network 1/3] api: zones: enable strict and warnings Lukas Sichert
2026-10-15 15:42 ` [PATCH perl-rs 2/3] common: enable strict and warnings in perl package modules Lukas Sichert
2026-10-16 13:43 ` Wolfgang Bumiller
2026-10-15 15:42 ` [PATCH proxmox 3/3] pve-api-types: enable strict and warnings in Bool Lukas Sichert
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox