accessing global variables in .xs wrapped libraries
djk at tobit.co.uk
Tue Jan 31 15:13:39 GMT 2006
Is there some 'official' perl way of setting global variables in a .xs
wrapped global library at runtime?
I have a (huge) legacy app that is (now) a shared library. I need to
call various routines in this shared library under the control of the
usual .xs wrapper mechanism and this is all just fine.
However some of this code relies on certain global variables in the app
being set up (you need to know that this app has several 100 potential
entry points, each requiring a different set of global variables to be
set [just don't ask, ok?]).
I know what these variables are called (or at least I can work it out)
and these are therefore findable thru things like dlsym() and its
So how do I find them and then set them (probably thru DynaLoader)? They
are (at least for now) just simple ints.
Dirk Koopman <djk at tobit.co.uk>
More information about the london.pm