Hello Folks, I'm scratching my head about this problem and have hit a dead end. I would appreciate your help in figuring this one out.
I have a method 'bar' in a package 'Foo' that is defined in XS as char *file = __FILE__; newXS('Foo::baz', XS_Foo__a_generic_handler, file); XSANY.any_i32 = some_integer; I use this generic handler to handle callbacks for various methods using the alias. I also use some caller context to determine how the method is getting called. The problem is that when I subclass Foo in Bar and define a method Bar::baz that calls Foo::bar as $self->SUPER::baz, I cannot figure out in _a_generic_handler() if the call is coming from Bar::baz directly or via Foo::baz. I tried digging this out of cxstack or by using find_runcv() and it always gives be Bar::baz in cases when 1. Bar::baz is directly hooked to _a_generic_handler() 2. Bar::baz calls _a_generic_handler() via Foo::bar The funny thing is that when I write the code in perl and print (caller(0))[3] it prints the right thing. If all this is confusing, feel free to ask me for a full example. Thanks in advance Cheers, Bharanee