Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re^2: Developing Perl against proprietary interfaces

by wade (Pilgrim)
on Apr 22, 2008 at 17:34 UTC ( [id://682230]=note: print w/replies, xml ) Need Help??


in reply to Re: Developing Perl against proprietary interfaces
in thread Developing Perl against proprietary interfaces

Instead of linking your C with Perl using raw XS, you might consider http://www.swig.org/. It builds the XS for you and, if you so choose, you can convert directly to Java. I've used SWIG before and it's really easy.
--
Wade
  • Comment on Re^2: Developing Perl against proprietary interfaces

Replies are listed 'Best First'.
Re^3: Developing Perl against proprietary interfaces
by samtregar (Abbot) on Apr 22, 2008 at 18:29 UTC
    You might, but I wouldn't. I've also used SWIG and I found it to be mostly a waste of time. It offers something I don't need (bindings for multiple languages) in exchange for greatly increased complexity. That complexity hides the actual details of the XS interface that you'll need to effectively debug your code. And you will need to debug your code!

    -sam

      My approach (which, admittedly, won't work for everybody) was to debug the two sides, separately. I got the Perl working with the C calls stubbed-out and I got the C working with a test harness on that side. At that point, I plugged the bad boys together and it worked like a charm.

      Of course, YMMV.

      --
      Wade

        Yikes! Was this node down-voted because somebody really doesn't like SWIG, because I defended my original post, because I elided the complexities of the interface, or for some other reason? I didn't mean to step on toes, here.

        --
        Wade

Log In?
Username:
Password:

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

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

    No recent polls found