]> git.proxmox.com Git - pve-common.git/commitdiff
improve code style of exception helper module
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Tue, 11 Apr 2023 12:49:59 +0000 (14:49 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Tue, 11 Apr 2023 12:50:05 +0000 (14:50 +0200)
fixes a perl critic lint against one-argument use of bless.

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

index fe6ecbb56062998fdf61ec733edafb649cebfe4c..f40f13ac0bf8f6772e81d9dc2478f93bf9845630 100644 (file)
@@ -6,9 +6,9 @@ package PVE::Exception;
 
 use strict;
 use warnings;
-use Storable qw(dclone);
-use HTTP::Status qw(:constants);
 
+use HTTP::Status qw(:constants);
+use Storable qw(dclone);
 
 use overload '""' => sub {local $@; shift->stringify};
 use overload 'cmp' => sub {
@@ -35,7 +35,7 @@ sub new {
        $self->{$p} = ref($v) ? dclone($v) : $v;
     }
 
-    return bless $self;
+    return bless $self, $class;
 }
 
 sub raise {