cast keys to hash references for stricter perls