ReinhardE has asked for the wisdom of the Perl Monks concerning the following question:
I was working on embedding Perl scripts in a software written in C. First thing what one would try out is the Perl C Interface. This approach however has also some disadvantages ( converting structures to objects, C variables to Perl variables, fiddling with the Perl stack, ......)
Another idea would be a "loosely coupled system". A process( written in Perl ) and listening on a TCP port. The software in C wishing to "use" the Perl scripts than contacts simply the process written in Perl and passes the data the Perl script act on. This should work and is also very transparent.
Another idea would be RPC. Now is there somebody out there who just tried out Remote Procedure Calls between Perl and C ? Or even better : did somebody already use shared memory between C and Perl ?
Are my dreams so far from reality ?
Big thanx for any comment
Reinhard
Another idea would be a "loosely coupled system". A process( written in Perl ) and listening on a TCP port. The software in C wishing to "use" the Perl scripts than contacts simply the process written in Perl and passes the data the Perl script act on. This should work and is also very transparent.
Another idea would be RPC. Now is there somebody out there who just tried out Remote Procedure Calls between Perl and C ? Or even better : did somebody already use shared memory between C and Perl ?
Are my dreams so far from reality ?
Big thanx for any comment
Reinhard
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Speaking between Perl and C
by salva (Canon) on Jun 02, 2005 at 15:22 UTC | |
Re: Speaking between Perl and C
by kutsu (Priest) on Jun 02, 2005 at 14:14 UTC | |
by ReinhardE (Sexton) on Jun 02, 2005 at 14:28 UTC | |
Re: Speaking between Perl and C
by Steve_p (Priest) on Jun 03, 2005 at 01:40 UTC | |
Re: Speaking between Perl and C
by mugwumpjism (Hermit) on Jun 03, 2005 at 07:02 UTC | |
by kaif (Friar) on Jun 03, 2005 at 23:11 UTC |
Back to
Seekers of Perl Wisdom