Keys' new ability to take a link is broken by design. The Perl development team could not understand how it should work with some links, so it only works for some links. Therefore, keys ability to accept a link is documented as experimental . Failed to solve this problem, this "feature" was removed 5.24. You should not use it, as your code will stop working when updating perl .
You are in the case when keys does not work when providing a link. Instead, specify a hash or array. In this case, you probably want
keys(%{ $this->{'libraries'}->{$y}->{'cellHash'} })
All this can be written as follows:
if (!keys(%{ $this->{libraries}{$y}{cellHash} })) { ... }
source share