note
muba
<p>This code feels... itchy... to me. No offense ;)</p>
<p>Let's assume <c>ref($hash) ne 'HASH'</c>, then <c>$data = $hash</c>, so <c>ref($data)</c> will never <c>eq 'HASH'</c>, so that statement modifier on the last line is redundant in this case.</p>
<p>However, say <c>ref($hash) eq 'HASH'</c> is true, then <c>$data = $$hash{$name}</c>, and then <c>$data = $$data{CONTENT}</c> provided that <c>$$hash{$name}</c> is a hashref. For the sake of argument, let's say it isn't. Then <c>$data</c> will still be <c>$$hash{$name}</c>. Is that how it's supposed to work?</p>
1016083
1016112