in reply to Re: Verifying function references in XSUBs
in thread Verifying function references in XSUBs

I think gv_fetchmethod() is sort of what I was looking for. In the situation I'm working with, perl passes to SV's to an XSUB. I verify (in one particular code branch) that the first is a reference to a blessed object, and that the second is a string. I would like to verify that the string is a valid method on the object before I call call_method(). The tricky bit is, I don't know the class name of the blessed object, I just have an instance reference. Is there some way to get the class name of the object?
  • Comment on Re: Re: Verifying function references in XSUBs

Replies are listed 'Best First'.
Re: Re: Re: Verifying function references in XSUBs
by samtregar (Abbot) on May 21, 2002 at 22:10 UTC
    I think you might be able to use HvNAME(SvSTASH(sv)) for that. Give it a try and see if that works.

    -sam