in reply to Re^2: Inline::C hash access
in thread Inline::C hash access
if( SvOK(sv) && SvTYPE(sv) == SVt_RV )That's not what you want - the SvTYPE just says what the SV's body physically consists of, and says nothing about whether it currently contains a valid RV. For example, if you do $x = "foo"; $x = \$y; then the SvTYPE of $x is actually SVt_PV. You probably want:
if (SvROK(sv)) ...
Dave.
|
---|
In Section
Seekers of Perl Wisdom