Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: "Using a hash as a reference is deprecated" -- Baloney !

by ikegami (Patriarch)
on May 11, 2011 at 20:24 UTC ( #904244=note: print w/replies, xml ) Need Help??


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
    Awesome. Excellent explanation, I had no idea this was a planned bugfix. Thanks everyone ! Here's the promised "baloney" :)
    Balogna ("baloney") and cheese: _.---._ _.-~ ~-._ _.-~ ~-._ _.-~ ~---._ _.-~ ~\ .-~ _.; :-._ _.-~./ }-._~-._ _..__.-~_.-~ ) `-._~-._~-._ / ...-~H.-~ ~-nad.._\. _.-~ .:::: // ~-. \`--...--~ _.-~__...==~ \.`--...---+-~~~~~ ~-..----~ How about a deli style turkey sandwich (damn I'm hungry now!): _.---._ _.-~ ~-._ _.-~ ~-._ _.-~ ~---._ _.-~ ~\ .-~ _.; :-._ _.-~ ./ `-._~-._ _..__.-~ _.-~ / ~-._~-._ / .__..--~----._ \_____(_;-._\. _.-~_/ ~).. . \ /(_____ \`--...--~_.-~______..-+_______) .(_________/`--...--~/ _/nad /\ /-._ \_ (___./_..-~__.....__..-~./ `-._~-._ ~\--------~ .-~_..__.-~ _.-~ ~-._~-._ ~---------' / .__..--~ ~-._\. _.-~_/ \`--...--~_.-~ `--...--~ Gotta have something to wash that down with... _ // // _______________//__ .(______________//___). | / | |. . . . . . . / . . .| \ . . . . . ./. . . . / | / ___ | _.---._ |::......./../...\.:| _.-~ ~-._ |::::/::\::/:\::::::| _.-~ ~-._ |::::\::/::::::X:/::| _.-~ ~---.;:::::::/::\::/:::::| _.-~ ~\::::::n::::::::::| .-~ _.;::/::::a::::::::/ :-._ _.-~ ./::::::::d:::::::| `-._~-._ _..__.-~ _.-~|::/::::::::::::::| / ~-._~-._ / .__..--~----.YWWWWWWWWWWWWWWWP' \_____(_;-._\. _.-~_/ ~).. . \ /(_____ \`--...--~_.-~______..-+_______) .(_________/`--...--~/ _/ /\ /-._ \_ (___./_..-~__.....__..-~./ `-._~-._ ~\--------~ .-~_..__.-~ _.-~ ~-._~-._ ~---------' / .__..--~ ~-._\. _.-~_/ \`--...--~_.-~ `--...--~

    credit to : Nate / DAC for the artwork !

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://904244]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (2)
As of 2022-01-29 07:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In 2022, my preferred method to securely store passwords is:












    Results (74 votes). Check out past polls.

    Notices?