# Question regarding adaption from swig/wrapper-interface from

**URL:** <https://www.ruby-forum.com/t/question-regarding-adaption-from-swig-wrapper-interface-from/84816>\
**Category:** Ruby\
**Created:** [February 7, 2007, 10:45pm UTC](https://www.ruby-forum.com/t/question-regarding-adaption-from-swig-wrapper-interface-from/84816 "2007-02-07T22:45:48Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tammo\_T](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/ea5d25/32.png) [@Tammo\_T](https://www.ruby-forum.com/u/Tammo_T)\
**Post date:** [February 7, 2007, 10:45pm UTC](https://www.ruby-forum.com/t/question-regarding-adaption-from-swig-wrapper-interface-from/84816/1 "2007-02-07T22:45:48Z")

</div>

Hello,  
actually I am fighting with the adaption of the interface to ruby. A lot  
of  
things are not the big problem.

For the start I would like to know if there is a equivalent for croak in  
ruby. I used simply printf-statements in the C+±code but that is only a  
poor replacement.

The other problem is much more tough. In the code the libperl+±library  
has  
been used. The code was not created by me. But if I get it properly they  
create a perl-interface to C+±code and in the C+±code again a  
perl-interpreter is embedded. It seems that can either start it with  
attach to an existing one with

Perlinterpreter \*perl;  
wPerl::attach(perl);

or even request a new one with  
wPerl::require\_interpreter();

It is somehow tricky and my problem is that I have found only very  
limited  
information about libperl++.

I think also, that I have heard that only one ruby-process can be  
embedded  
at a time. I am not sure how the attach works in ruby.  
This strange structure is especially used to for Error-handling. I do  
not  
get the full picture, but I assume they want to have the Error rised  
inside  
the interpreter and not the C-code???

Sorry for the limited informations. But I haven’t get the full picture  
until  
now. That is the main reason for the question :-).

Thank You,  
Tammo
