![]() |
|
Just another Perl shrine | |
PerlMonks |
Re^3: Inline::C hash accessby dave_the_m (Monsignor) |
on Sep 04, 2008 at 15:14 UTC ( #709036=note: print w/replies, xml ) | Need Help?? |
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:
Dave.
In Section
Seekers of Perl Wisdom
|
|