You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@perl.apache.org by Manuel Reimer <Ma...@nurfuerspam.de> on 2011/01/06 18:01:50 UTC
Where to find information on how to embed perl into C(++)?
Hello,
I'm posting to this list, as I think the people around mod-perl have a good
knowledge about how to embed perl into applications.
I've searched the web for good information, but anything, i found, wasn't very
useful. "man perlembed" only tells some raw basics and doesn't really help me to
find where to start.
What I want to do is to use perl to create plugins for an application, which
usually gets extended using C++. So what I want to do is a C++ plugin for that
application, which loads a perl script and exports parts of the API into the
namespace of this perl script.
A big problem is, that I need bidirectional communication from C to perl and
back again. Means, that I need some way to call functions in the C application
from perl. Most documentation, out there, only covers calling perl functions
from C but not the other way.
It would really help me, if someone could point me to good documentation about
embedding perl. I would prefer to get something in printed form, but the only
book, I found (Extending and embedding Perl) is not longer available in Germany.
Thank you very much in advance
Yours
Manuel Reimer
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org
Re: Where to find information on how to embed perl into C(++)?
Posted by Al Mollenkopf <bi...@mollensoft.com>.
Hi Manuel,
this is a relatively complicated topic, so if you receive no other help,
I'd recommend trying to grab a used copy of "Extending and Embedding
Perl" from Amazon.com (should be able to ship there). It's no panacea
but been pretty valuable to me over the years and will likely provide
you with some foundational knowledge that will enable you to get to your
destination.
I'd recommend starting with Chapter 8 where the discussion focuses
initially on when to embed and when not to embed perl into C, passing
data, etc.
HTH,
Al
bigal@mollensoft.com
On Thu, 2011-01-06 at 18:01 +0100, Manuel Reimer wrote:
> Hello,
>
> I'm posting to this list, as I think the people around mod-perl have a good
> knowledge about how to embed perl into applications.
>
> I've searched the web for good information, but anything, i found, wasn't very
> useful. "man perlembed" only tells some raw basics and doesn't really help me to
> find where to start.
>
> What I want to do is to use perl to create plugins for an application, which
> usually gets extended using C++. So what I want to do is a C++ plugin for that
> application, which loads a perl script and exports parts of the API into the
> namespace of this perl script.
>
> A big problem is, that I need bidirectional communication from C to perl and
> back again. Means, that I need some way to call functions in the C application
> from perl. Most documentation, out there, only covers calling perl functions
> from C but not the other way.
>
> It would really help me, if someone could point me to good documentation about
> embedding perl. I would prefer to get something in printed form, but the only
> book, I found (Extending and embedding Perl) is not longer available in Germany.
>
> Thank you very much in advance
>
> Yours
>
> Manuel Reimer
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
> For additional commands, e-mail: dev-help@perl.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org