Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: Extending an embedded Perl interpreter without a .pm file

by jeremyh (Beadle)
on Feb 08, 2005 at 00:07 UTC ( #428869=note: print w/ replies, xml ) Need Help??


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.


Comment on Re: Extending an embedded Perl interpreter without a .pm file
Download Code
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.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://428869]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (10)
As of 2014-07-11 09:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    When choosing user names for websites, I prefer to use:








    Results (223 votes), past polls