[Israel.pm] Embedding perl in a C++ program
David.Rachamim at ceva-dsp.com
Thu Dec 30 08:56:51 PST 2004
I am trying to implement a Perl scripting extension to a GUI C++ program.
This extension should provide the capability for the user to write Perl scripts/commands that will run in the context of the main application and will be able to interact with it.
An example for such a script can be:
my $i = call_some_perl_func();
main_app_show_popup( "i=$i"); #should call a function on the main application (C++) and popup a message window there
(To be clear, this script should be written by the user in an edit bow in the main application and should run upon pressing a "Run Perl Script" button)
I saw that it is not too hard to embed a Perl interpreter into my application, but I couldn't figure out how I can cause the running Perl script to interact with the main C++ application.
I guess this task is not trivial, but I'll appreciate any help on that - even a reference to an application that does something similar can help.
Thanks in advance,
More information about the Perl