From: Thomas Lamprecht Date: Fri, 19 May 2023 13:41:37 +0000 (+0200) Subject: exception: white space cleanup X-Git-Url: https://git.proxmox.com/?p=pve-apiclient.git;a=commitdiff_plain;h=2401ab289ac77e2a2028308efebe5a49eb1cf467 exception: white space cleanup Signed-off-by: Thomas Lamprecht --- diff --git a/PVE/APIClient/Exception.pm b/PVE/APIClient/Exception.pm index e9110f1..a2bfa29 100644 --- a/PVE/APIClient/Exception.pm +++ b/PVE/APIClient/Exception.pm @@ -11,7 +11,7 @@ use strict; use warnings; use vars qw(@ISA @EXPORT_OK); require Exporter; -use Storable qw(dclone); +use Storable qw(dclone); use HTTP::Status qw(:constants); @ISA = qw(Exporter); @@ -19,7 +19,7 @@ use HTTP::Status qw(:constants); use overload '""' => sub {local $@; shift->stringify}; use overload 'cmp' => sub { my ($a, $b) = @_; - local $@; + local $@; return "$a" cmp "$b"; # compare as string }; @@ -35,7 +35,7 @@ sub new { }; foreach my $p (keys %param) { - next if defined($self->{$p}); + next if defined($self->{$p}); my $v = $param{$p}; $self->{$p} = ref($v) ? dclone($v) : $v; } @@ -46,7 +46,7 @@ sub new { sub raise { my $exc = PVE::APIClient::Exception->new(@_); - + my ($pkg, $filename, $line) = caller; $exc->{filename} = $filename; @@ -61,11 +61,11 @@ sub raise_perm_exc { my $param = { code => HTTP_FORBIDDEN }; my $msg = "Permission check failed"; - + $msg .= " ($what)" if $what; my $exc = PVE::APIClient::Exception->new("$msg\n", %$param); - + my ($pkg, $filename, $line) = caller; $exc->{filename} = $filename; @@ -91,7 +91,7 @@ sub raise_param_exc { $param->{usage} = $usage if $usage; my $exc = PVE::APIClient::Exception->new("Parameter verification failed.\n", %$param); - + my ($pkg, $filename, $line) = caller; $exc->{filename} = $filename; @@ -142,7 +142,7 @@ sub stringify { sub PROPAGATE { my ($self, $file, $line) = @_; - push @{$self->{propagate}}, [$file, $line]; + push @{$self->{propagate}}, [$file, $line]; return $self; }