I spent some time digging through the Perl documentation and source
code, and I'm starting to have doubts about this idea of "fix it
by applying SvGETMAGIC to array/hash entries". I can't see anything
in the documentation recommending such an approach, and I don't see
any of their own code doing so either. Pretty much all their calls
to SvGETMAGIC are in functions that have been passed a scalar value
from elsewhere. So while this may work today, I'm unconvinced that
it's idiomatic or future-proof. Can you point at any production code
that is doing it this way?
regards, tom lane