in reply to Re^12: Perl calls C calls Perl CallBack: How Perl callback use the same interpreter/context as Perl caller?
in thread Perl calls C calls Perl CallBack: How Perl callback use the same interpreter/context as Perl caller?

You should be writing your C code as an XS file (perlxs). Perl (well, DynaLoader) will then take care of loading your extension, setting you up with the Perl interpreter and doing all the work.

Most likely, perlxstut contains enough to get you started.

  • Comment on Re^13: Perl calls C calls Perl CallBack: How Perl callback use the same interpreter/context as Perl caller?