Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

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

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


in reply to Extending an embedded Perl interpreter without a .pm file

Have you tried putting all the code for "DynTrans" in the first argument to eval_pv, but just as a perl script containing subroutines, not as a Package?


Comment on Re: Extending an embedded Perl interpreter without a .pm file
Re^2: Extending an embedded Perl interpreter without a .pm file
by ShodadVenturi (Acolyte) on Feb 08, 2005 at 17:55 UTC
    The problem with this is that the code that I want to add is written in C, not Perl. So I need the package to interface the C implementations into Perl callables. It's not just a matter of making these subroutines visible to Perl, but also linking them to the correct C functions. I assume that the .pm file is doing this somehow, but I don't know what the context is, it doesn't seem to be in the main namespace of the interpreter, or the eval_pv() trick described above would have worked.

    Thanks for the suggestions, though.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (6)
As of 2014-12-28 08:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (179 votes), past polls