in reply to Is there any module to use perl Api's with return values Hash and array in my java code

For the one way round, see JNI (a Perl encapsulation of the Java Native Interface) and PBJ::JNI (full access to and from Java virtual machine from Perl). As for the other way round - calling perl from within Java - you might have a look at Jakarta ORO, they've done something with perl regexes. I don't know how they implemented it, wether they us perllib etc., since I'm no Java programmer. But maybe it's a starting point.

--shmem

_($_=" "x(1<<5)."?\n".q·/)Oo.  G°\        /
                              /\_¯/(q    /
----------------------------  \__(m.====·.(_("always off the crowd"))."·
");sub _{s./.($e="'Itrs `mnsgdq Gdbj O`qkdq")=~y/"-y/#-z/;$e.e && print}
  • Comment on Re: Is there any module to use perl Api's with return values Hash and array in my java code

Replies are listed 'Best First'.
Re^2: Is there any module to use perl Api's with return values Hash and array in my java code
by iguanodon (Priest) on Jun 28, 2006 at 13:28 UTC
    Jakarta ORO just provides perl compatible regular expressions, it doesn't actually provide any interface to Perl. And for what it's worth, I have found the claim of compatibility to be a little misleading. I was unable to port some of my Perl regular expressions to ORO and had to resort to an ugly set of if/elses. That was before JDK 1.4 was available, I can't recall if I went back and tried to implement the same regular expressions with the native JDK 1.4 support.

    I've solved a problem similar to the OP's with a Perl web service called by a Java client, but the performance of SOAP::Lite web services was pretty poor.