Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
I've embedded Perl into a server written in C. Perl's job is to manipulate some data structures and do other general glue work. My question is if there exists a way to make the perl code call back C code?
Ie, some data comes in, C initializes some data structures and sends a reference to them to a Perl sub, which fiddles them around a bit, and then in certain circumstances calls a C function. (Or a Perl wrapper to a C function or whatnot).
The closest I've found would be a C XS extension, but will the master program and the C extension exist in the same namespace? Or is there a better way to do what I want?
Thanks in advance,
Ryan
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Embedded perl question
by salva (Canon) on Dec 22, 2005 at 10:25 UTC |