http://www.perlmonks.org?node_id=904241


in reply to "Using a hash as a reference is deprecated" -- Baloney !

Paraphrasing from from perlop:The left side of the "->" ( infix dereference operator) must be a REFERENCE to ....

In your case, you are supplying a HASH (Not a reference).

Just get rid of the %{...} , and you will have a (Hash) reference.

return $WAI->kBToMB( $WAI->getMem()->{MemTotal} );
(No need for quotes inside {} ).

     Syntactic sugar causes cancer of the semicolon.        --Alan Perlis