Dirk Koopman said:
> So how do I find them and then set them (probably thru DynaLoader)? They
> are (at least for now) just simple ints.

You could use tie'd scalars for this.  Create your perl-level variables from
perl, passing the c names to your tie, and tie them all to the same class.  In
the FETCH and STORE routines, do the dlsym lookup and load or store the value.
 If they'll be changed a lot, you might instead cache their addresses after
doing the dlsym lookup in TIESCALAR.

I've used this trick to tie a perl hash-like object to a fancy C key-query
object, and it didn't take a lot of code.  I have *not* done it for scalars,
but i'm guessing it wouldn't be too hard.


-- 
muppet <scott at asofyet dot org>

Reply via email to