Dear list members! I am new to XS and have not found the solution to my problem in either docs or CPAN modules' sources so far.
I want to implement a perl object as a hash reference but I want some functionality to be implemented in C which requires to bind some C struct with this perl object. The question is how this can be accomplished. The obvious solution (storing a pointer to the struct as one of the hash's value) has the obvious objection: anyone has access to this value at perl level as $obj->{key} = "whatever"; or even delete($obj->{key}); Nevertheless the CPAN modules I investigated use either this approach or they implement all functionality in C. In the latter case the object is implemented as a reference to a scalar which holds memory address so perl code like: $$obj = 0x12345; may break up all the internal C implementation. So my question is whether it is possible to completely hide C internals from perl level. -- Yours sincerely, Vadim.