Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine

Using Existing C or/and Java Modules in Perl

by vennirajan (Friar)
on Dec 09, 2005 at 08:35 UTC ( #515483=perlquestion: print w/replies, xml ) Need Help??
vennirajan has asked for the wisdom of the Perl Monks concerning the following question:

Hi Gr8 ppl,

I want to use the existing C or/and JAVA modules ( header files - default sytem files or/and user defined files ) in Perl. Is there any way, i can achieve it ? I know that we can use the system calls using

use POSIX;

But this seems to be critical because of modules.

Waiting for your valuable inputs.
Thanks in advance.
S.Venni Rajan.
"A Flair For Excellence."
                -- BK Systems.

Replies are listed 'Best First'.
Re: Using Existing C or/and Java Modules in Perl
by tirwhan (Abbot) on Dec 09, 2005 at 08:39 UTC

    Take a look at the Inline modules, specifically Inline::C and Inline::Java, they make this really easy.

    Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it. -- Brian W. Kernighan
Re: Using Existing C or/and Java Modules in Perl
by gjb (Vicar) on Dec 09, 2005 at 10:19 UTC

    For C/C++ ocde you can also have a look at SWIG, the Simplified Wrapper and Interface Generator. Of course, using XS is also an option, some information can be found in Advanced Perl Programming by Simon Cozens (and probably elsewhere, but that's what I used).

    Apart from the Inline::Java module mentioned above there's also Java which allows a Perl program to access a local or remote JVM.

    Hope this helps, -gjb-

      Thanks gjb. That advance perl programming link will be very much helpfull for me.
      S.Venni Rajan.
      "A Flair For Excellence."
                      -- BK Systems.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://515483]
Approved by jbrugger
[Corion]: Meh. Some Open Source people get bought out by advertising firms to change their projects to include advertising. But nobody has approached me to buy out WWW::Mechanize ::$browser from me, to make the browsers launch an ad page ...
[Corion]: ... instead of about:blank, which the modules currently do at startup.
[Corion]: Maybe I'm too pricey. But I haven't received any offers at all ;-)
[Corion]: The ad hits from CPAN testers alone should bring in a pretty penny IMO. But maybe I misestimate the CPC that ads pay.

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (11)
As of 2017-07-24 14:18 GMT
Find Nodes?
    Voting Booth?
    I came, I saw, I ...

    Results (354 votes). Check out past polls.