Friday 14 October 2011

Getting rid of "defined(%hash) is deprecated" warnings.

We've been getting the warning message:

defined(%hash) is deprecated at /home/xpapers/lib/Rose/DBx/Object/Cached/FastMmap.pm line 334.
(Maybe you should just omit the defined()?)


from a lot of the cron jobs in xpapers, this had been generating hundreds of emails per day and burying real errors. It turns out just by changing line 334 in FastMmap.pm from:

(defined %$SETTINGS ? %$SETTINGS : ()),

to

%$SETTINGS ? %$SETTINGS : (),

seems to fix it. I've not had any errors so far suggesting that this was incorrect.

No comments:

Post a Comment