Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Using Existing C or/and Java Modules in Perl

by vennirajan (Friar)
on Dec 09, 2005 at 08:35 UTC ( [id://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.

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

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
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?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (7)
As of 2024-04-25 14:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found