Extend global symbol table in embedded perl

A

Aphor

The 30 second version:
----------------------
Is it possible to add a new function to Perl's global symbol table
somewhere during the perl_(alloc,construct,parse,run) sequence?

The details:
------------
I'm working with a Win32 application that currently has a method for adding
extension DLLs. When the extension is first loaded (which may or may not
be at application startup), it is given pointers to a function AppFunction
(). I'm writing an application extension that contains an embedded perl
interpreter. I would like to make AppFunction() available to the perl
scripts. Looking through the perl source, I /think/ I need to push
something into either Perl->Imodglobal or Perl->Iglobalstash, but I'm not
sure how to get back at that data from the script in order to verify that
I'm correct.

The disclaimer:
---------------
This is my first project embedding perl (unless you count building the
samples in perlembed), so I'm far from an expert.

I've poked through the various PODs, the perl source, the newsgroups, and
various perl books, but haven't noticed anything that addresses the correct
way to do this.

If I'm off-my-rocker and should be looking at a different way to solve the
problem, by all means, please point me in the right direction.

If I haven't provided enough information, let me know and I'll be more
verbose in describing the problem.

Thanks,
Aphor N.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top