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

Perl Embeding

Thread Next
From:
Shmuel Fomberg
Date:
March 22, 2007 09:17
Subject:
Perl Embeding
Message ID:
4709.212.199.104.198.1174580196.squirrel@ssl.epfarms.org
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:
PERL_SYS_INIT3(&argc,&argv,&env);
PERL_SYS_TERM();
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
exists)
but if I sv_bless an reference, to the same package (that I got pointer to
using:
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.

Shmuel.


Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About