]> git.proxmox.com Git - librados2-perl.git/commitdiff
avoid one-argument "bless"
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Thu, 17 Nov 2022 13:17:53 +0000 (14:17 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Thu, 17 Nov 2022 13:17:56 +0000 (14:17 +0100)
can be pretty confusing because if we ever would add a subclass
basing on this module it would get the parent as class and thus the
method calls would not be overridable

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
PVE/RADOS.pm

index 37eb29000347bdf0afe203f984ad5ffb5ffa1bb9..3ee7ab8e62bb188ec4f1fb8fc22036b5304316aa 100644 (file)
@@ -117,7 +117,7 @@ sub new {
 
     die "unable to fork - $!\n" if !defined($cpid);
 
-    my $self = bless {};
+    my $self = bless {}, $class;
 
     my $timeout = delete $params{timeout} || $rados_default_timeout;