summaryrefslogtreecommitdiffstats
path: root/MDK/Common/DataStructure.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2003-02-12 11:28:12 +0000
committerPascal Rigaux <pixel@mandriva.com>2003-02-12 11:28:12 +0000
commit9f27f3981d4a7e584964336266173da20e703b69 (patch)
tree77a9c8ace9f695d13d93b4ddc0cab69218368996 /MDK/Common/DataStructure.pm
parentfa0065c024f2dac346f4659ea6b880526c9e7716 (diff)
downloadperl-MDK-Common-9f27f3981d4a7e584964336266173da20e703b69.tar
perl-MDK-Common-9f27f3981d4a7e584964336266173da20e703b69.tar.gz
perl-MDK-Common-9f27f3981d4a7e584964336266173da20e703b69.tar.bz2
perl-MDK-Common-9f27f3981d4a7e584964336266173da20e703b69.tar.xz
perl-MDK-Common-9f27f3981d4a7e584964336266173da20e703b69.zip
perl_checker compliance ("ref" now need parentheses in many case)
Diffstat (limited to 'MDK/Common/DataStructure.pm')
-rw-r--r--MDK/Common/DataStructure.pm4
1 files changed, 2 insertions, 2 deletions
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 }