From 4d086cd6ef6ce60a3cfc90c7d02b57928282f2e1 Mon Sep 17 00:00:00 2001 From: Ferenc Erki Date: Fri, 1 Nov 2024 23:34:39 +0100 Subject: [PATCH] Fix precedence warning after perl-5.41.4 This also fixes related ValuesAndExpressions::NotWithCompare perlcritic violations. --- ChangeLog | 1 + lib/Rex/Shared/Var/Array.pm | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index f724819fc..336734a4b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -4,6 +4,7 @@ Revision history for Rex [API CHANGES] [BUG FIXES] + - Fix precedence warning after perl-5.41.4 [DOCUMENTATION] diff --git a/lib/Rex/Shared/Var/Array.pm b/lib/Rex/Shared/Var/Array.pm index da83c9559..c7a8bb311 100644 --- a/lib/Rex/Shared/Var/Array.pm +++ b/lib/Rex/Shared/Var/Array.pm @@ -80,7 +80,7 @@ sub PUSH { __lock sub { my $ref = __retrieve; - if ( !ref( $ref->{ $self->{varname} }->{data} ) eq "ARRAY" ) { + if ( ref( $ref->{ $self->{varname} }->{data} ) ne "ARRAY" ) { $ref->{ $self->{varname} }->{data} = []; } @@ -97,7 +97,7 @@ sub UNSHIFT { __lock sub { my $ref = __retrieve; - if ( !ref( $ref->{ $self->{varname} }->{data} ) eq "ARRAY" ) { + if ( ref( $ref->{ $self->{varname} }->{data} ) ne "ARRAY" ) { $ref->{ $self->{varname} }->{data} = []; }