in reply to "Using a hash as a reference is deprecated" -- Baloney !
Due to a bug in Perl,
%foo->{bar}
gets interpreted as a
(\%foo)->{bar}
->{bar} expects a reference, and thus a scalar, so it should be interpreted as
scalar(%foo)->{bar}
The deprecation warning was added in anticipation of getting this bug fixed.
Since
%{$WAI->getMem()}->{'MemTotal'}
is getting interpreted as
\%{$WAI->getMem()}->{'MemTotal'}
you could use that, or you could shorten it to
$WAI->getMem()->{'MemTotal'}
Now where's this baloney you promised? I'm hungry!
Update: Fixed bad curlies matching in second half.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: "Using a hash as a reference is deprecated" -- Baloney !
by Anonymous Monk on May 11, 2011 at 20:40 UTC |
In Section
Seekers of Perl Wisdom