develooper Front page | perl.perl5.porters | Postings from March 2007

Perl Embeding

Thread Next
Shmuel Fomberg
March 22, 2007 09:17
Perl Embeding
Message ID:
Hello There.

I'm trying to embed Perl as a plug-in DLL to some other system.
And I have a few questions:

1. what is the role of:
in enviroment where I don't have argv to give it?

2. the same question, but about a multi-threaded, multi-perl-interperters
enviromant. (the perl interperters themselfs do not include threads, for
now. just being run by different threads)
For now, I keep count of how many interperters are, and intend to
call PERL_SYS_INIT3 before starting the first, and PERL_SYS_TERM
when I detect that I killed the last. (but that does not mean that a new
Perl interperter won't be created afterwards)

3. load_module does not work for me. it crocks that the pm file can't
be found, while it's clearly in the path.
I took a look in the code that the pre-processor outputs, and saw that
it does not have a perl-interpeter parameter. (like my_perl)
For now - I'm using:
	SV *cmd = newSVpvf("require %s;", pkg_name);
	eval_sv(cmd, G_DISCARD);
as a workaround.

4. call_method, then the first parameter is a string SV containing the
name of the package, refuse to work. (cleiming that the package does not
but if I sv_bless an reference, to the same package (that I got pointer to
gv_stashpvn(pkg_name, strlen(pkg_name), FALSE);
) then the package is found and the function is being called.

I am using ActiveState 5.8.8.

any help will be appriciated.


Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About