class Foo { void some_method(int arg) { do_something; } }; #### void some_method(SV* self, int arg) { // can I store the pointer as IV? SV* inner = SvRV(self); Foo* obj = (Foo*) SvIV(inner); obj->some_method(arg); }