[PATCH pve-network] SDN: Dhcp: perl 5.40 compat

Jing Luo jing at jing.rocks
Sat Nov 23 07:19:36 CET 2024


On trixie with perl 5.40 we see these errors:

Nov 14 06:28:54 pi16 pve-firewall[932]: Attempt to call undefined import method with arguments ("config") via package "PVE::Network::SDN::Dhcp" (Perhaps you forgot to load the package?) at /usr/share/perl5/PVE/Network/SDN/Dhcp.pm line 10, <DATA> line 960.
Nov 14 06:28:54 pi16 pve-firewall[932]: Attempt to call undefined import method with arguments ("sdn_subnets_config" ...) via package "PVE::Network::SDN::Subnets" (Perhaps you forgot to load the package?) at /usr/share/perl5/PVE/Network/SDN/Dhcp.pm line 12, <DATA> line 960.
Nov 14 06:28:54 pi16 pvestatd[904]: Attempt to call undefined import method with arguments ("config") via package "PVE::Network::SDN::Dhcp" (Perhaps you forgot to load the package?) at /usr/share/perl5/PVE/Network/SDN/Dhcp.pm line 10, <DATA> line 960.
Nov 14 06:28:54 pi16 pvestatd[904]: Attempt to call undefined import method with arguments ("sdn_subnets_config" ...) via package "PVE::Network::SDN::Subnets" (Perhaps you forgot to load the package?) at /usr/share/perl5/PVE/Network/SDN/Dhcp.pm line 12, <DATA> line 960.
Nov 14 06:28:54 pi16 pvedaemon[1126]: Attempt to call undefined import method with arguments ("config") via package "PVE::Network::SDN::Dhcp" (Perhaps you forgot to load the package?) at /usr/share/perl5/PVE/Network/SDN/Dhcp.pm line 10, <DATA> line 960.
Nov 14 06:28:54 pi16 pvedaemon[1126]: Attempt to call undefined import method with arguments ("sdn_subnets_config" ...) via package "PVE::Network::SDN::Subnets" (Perhaps you forgot to load the package?) at /usr/share/perl5/PVE/Network/SDN/Dhcp.pm line 12, <DATA> line 960.

So let's fix it. No regression for bookworm so far.

Signed-off-by: Jing Luo <jing at jing.rocks>
---
probably should've opened a ticket on bugzilla? anyways...
---
 src/PVE/Network/SDN/Dhcp.pm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/PVE/Network/SDN/Dhcp.pm b/src/PVE/Network/SDN/Dhcp.pm
index d48de34..c42e730 100644
--- a/src/PVE/Network/SDN/Dhcp.pm
+++ b/src/PVE/Network/SDN/Dhcp.pm
@@ -7,9 +7,9 @@ use PVE::Cluster qw(cfs_read_file);
 
 use PVE::Network::SDN;
 use PVE::Network::SDN::SubnetPlugin;
-use PVE::Network::SDN::Dhcp qw(config);
+use PVE::Network::SDN::Dhcp;
 use PVE::Network::SDN::Ipams;
-use PVE::Network::SDN::Subnets qw(sdn_subnets_config config get_dhcp_ranges);
+use PVE::Network::SDN::Subnets;
 use PVE::Network::SDN::Dhcp::Plugin;
 use PVE::Network::SDN::Dhcp::Dnsmasq;
 
-- 
2.47.0





More information about the pve-devel mailing list