Vadim O. Ustiansky <[EMAIL PROTECTED]> writes:
>
>So my question is whether it is possible to completely hide
>C internals from perl level.

More or less.

If you associate the C pointer with the object by using MAGIC
then it is very hard for perl code to get at it.
(The B:: stuff can probably still mess with it...)

If you then implement C struct accessors as methods you 
have 

   my $get = $obj->key;
   $obj->key($set); 

You need a custom typemap for this (obviously).
Tk and DBI both use this scheme.

See PERL_MAGIC_ext in perlguts.pod

Reply via email to