From: Thomas Lamprecht Date: Mon, 30 Nov 2020 14:03:30 +0000 (+0100) Subject: use two-argument bless X-Git-Url: https://git.proxmox.com/?p=pve-apiclient.git;a=commitdiff_plain;h=38fbee3cdd2a0d1f9926d1586e7a22500e74bb57 use two-argument bless else we'd break "inheriting" (or whatever perl does is called) to child modules > Never use the one-argument form of bless. -- Perl Best Practices, Pg. 365 Signed-off-by: Thomas Lamprecht --- diff --git a/PVE/APIClient/LWP.pm b/PVE/APIClient/LWP.pm index baf3a68..e988033 100755 --- a/PVE/APIClient/LWP.pm +++ b/PVE/APIClient/LWP.pm @@ -317,7 +317,7 @@ sub new { register_fingerprint_cb => $param{register_fingerprint_cb}, timeout => $param{timeout} || 60, }; - bless $self; + bless $self, $class; if (!$ssl_opts->{SSL_verify_callback}) { $ssl_opts->{'SSL_verify_mode'} = SSL_VERIFY_PEER;