in reply to Extending an embedded Perl interpreter without a .pm file

I have embedded the perl interpreter in a C app and used
perl_parse(my_perl, argc, argv, env);
perl_parse(my_perl, xs_init, argc, argv, env);

where argv[1] = "perl_script.pl"; argv[0] = c program's argv[0];

then I do the "use My_Module;"

in perl_script.pl (it's just a wrapper for the module call)

You can set up @INC in perl_script.pl so that you can be sure to find your module.

I have not used a full path for perl_script.pl, but I'm pretty sure you could.

Replies are listed 'Best First'.
Re^2: Extending an embedded Perl interpreter without a .pm file
by jeremyh (Beadle) on Feb 08, 2005 at 00:40 UTC
    So I suppose you could put your functions directly in perl_script.pl and dispense with the .pm file.