Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: Interfacing Perl with other languages

by Corion (Patriarch)
on Feb 08, 2008 at 06:55 UTC ( [id://666915]=note: print w/replies, xml ) Need Help??


in reply to Interfacing Perl with other languages

Being able to use Perl modules is fairly unlikely, because most languages are not like Perl. You will likely be able to use (80% of) Perl modules with Kurila, a Perl fork. Perl6 (if it ever comes out) is supposed to have a Perl5 interpreter mode, but as far as I know, currenly only the Perl5 interpreted version of Perl6 is able to run Perl5 code (no surprise).

You can embed a Perl interpreter into any language that can embed C subroutines - see perlembed for how to do this. You will need a C compiler though, to compile Perl for that.

You can use other languages from Perl, by using the Inline family of modules. Most of these modules require a compiler for the other language.

There are some ways of using parts written in other languages that are specific to different operating systems. On Windows, you can transparently use any object that has an OLE interface through Win32::OLE. To write an OLE object in Perl, you have to buy the ActiveState PerlKit (I believe), but that works on Windows only. For OSX (and I believe MacOS as well), there are AppleScript events that you can issue from Perl. I'm not sure if the CamelBones library supports receiving such events as well.

The most generic ways of interfacing two programs is to either run the other code as a subprogram (see perlipc) or have one program be a webserver and use the other one to make requests to it.

  • Comment on Re: Interfacing Perl with other languages

Replies are listed 'Best First'.
Re^2: Interfacing Perl with other languages
by chromatic (Archbishop) on Feb 08, 2008 at 08:07 UTC

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (5)
As of 2024-04-24 07:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found