I have a compound hashref as follows
my $ch = {
k1 => [ { k=>1 }, { m=>2 } ],
k2 => [ { l=>90}, ... ],
};
Hash::Util::lock_hashref_recurse($ch) does not effectively lock these values..
@{$ch->{k1}}[0]->{k} = 'New value'; is allowed ! How do i lock such a hashref completely ?
According to the documentation:
This method only recurses into hashes that are referenced by another hash. Thus a Hash of Hashes (HoH) will all be restricted, but a Hash of Arrays of Hashes (HoAoH) will only have the top hash restricted.
And you have a Hash of Arrays of Hashes