Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

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.
Regards,
S.Venni Rajan.
"A Flair For Excellence."
                -- BK Systems.

Comment on Using Existing C or/and Java Modules in Perl
Download Code
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.
      Regards,
      S.Venni Rajan.
      "A Flair For Excellence."
                      -- BK Systems.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (10)
As of 2014-12-28 15:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

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





    Results (182 votes), past polls