[mplspm]: Tips for building an *.xs module?

Dion Almaer dion at almaer.com
Wed Oct 10 09:48:08 CDT 2001


Yes.  Have SWIG do the work for you, since you are just wrapping C functions that already exist.
I personally think that embedding Perl, or wrapping C is way more difficult that it should be.
If you look at how Python does it, you realise how clean it could be.  Hopefully this is where Perl 6
is going right? ;)
Thankfully the SWIG folks did the hard work for you :)

D

> -----Original Message-----
> From: owner-mpls at pm.org [mailto:owner-mpls at pm.org]On Behalf Of Troy
> DeJongh
> Sent: Wednesday, October 10, 2001 8:30 AM
> To: mpls at pm.org
> Subject: Re: [mplspm]: Tips for building an *.xs module?
> 
> 
> Mark Conty wrote:
> > Hi --
> > 
> > I'm 'bout to embark on building an *.xs module for a set of an HP-provided
> > library functions that we use here at work.  Up until now, I've been calling
> > these routines with system() or open(PIPE,...), but I want to take advantage
> > of these library routines instead, to keep from having to spawn subordinate
> > shell processes unnecessarily.
> > 
> > I'm starting to read through the 'perlxstut' man page, and I know about the
> > 'perlxs' and 'h2xs' man pages, but I thought I'd check if any of you have
> > done this kind of thing recently and could pass along any tips/pointers.
> 
> Mark, 
> 
> Swig will get you where you wanna be in no time (that is, if my
> assessment of what you're trying to do is correct).  Check out:
> 
>    http://www.swig.org
> 
> 
> Take care.
> 
> --Troy
> 
> -- 
> Troy DeJongh                                       http://pobox.com/~troyd
> 
> 
> 
> --------------------------------------------------
> Minneapolis Perl Mongers mailing list
> 
> To unsubscribe, send mail to majordomo at pm.org
> with "unsubscribe mpls" in the body of the message.
> 


--------------------------------------------------
Minneapolis Perl Mongers mailing list

To unsubscribe, send mail to majordomo at pm.org
with "unsubscribe mpls" in the body of the message.



More information about the Mpls-pm mailing list