From 9f27f3981d4a7e584964336266173da20e703b69 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Wed, 12 Feb 2003 11:28:12 +0000 Subject: perl_checker compliance ("ref" now need parentheses in many case) --- MDK/Common/DataStructure.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'MDK') diff --git a/MDK/Common/DataStructure.pm b/MDK/Common/DataStructure.pm index a48afe4..195f4cb 100644 --- a/MDK/Common/DataStructure.pm +++ b/MDK/Common/DataStructure.pm @@ -124,8 +124,8 @@ sub member { my $e = shift; foreach (@_) { $e eq $_ and return 1 } 0 } sub invbool { my $a = shift; $$a = !$$a; $$a } sub listlength { scalar @_ } sub strcpy { substr($_[0], $_[2] || 0, length $_[1]) = $_[1] } -sub deref { ref $_[0] eq "ARRAY" ? @{$_[0]} : ref $_[0] eq "HASH" ? %{$_[0]} : $_[0] } -sub deref_array { ref $_[0] eq "ARRAY" ? @{$_[0]} : $_[0] } +sub deref { ref($_[0]) eq "ARRAY" ? @{$_[0]} : ref($_[0]) eq "HASH" ? %{$_[0]} : $_[0] } +sub deref_array { ref($_[0]) eq "ARRAY" ? @{$_[0]} : $_[0] } sub is_empty_array_ref { my $a = shift; !defined $a || @$a == 0 } sub is_empty_hash_ref { my $a = shift; !defined $a || keys(%$a) == 0 } -- cgit v1.2.1