in reply to How to Add MD5 C program using Inline::C to a perl program???

you might want to build an XS module for your project

I've often wondered whether there is something that can be handled by XS and that cannot be handled by Inline::C. When I look at the XS file that Inline::C generates, I find that it invariably contains "PROTOTYPES: DISABLE" - which leads me to believe that there may well be instances where Inline::C fails but XS succeeds (eg those instances where one needs to specify "PROTOTYPES: ENABLE" ... if such instances exist). Does anyone have a simple example of something that can be done using XS, but cannot be done using Inline::C ?

Sorry, Velaki, this question is not addressed specifically to you. It should probably be raised as a separate thread ... which is something I may yet do.

Cheers,
Rob
  • Comment on Re: How to Add MD5 C program using Inline::C to a perl program???

Replies are listed 'Best First'.
Re^2: How to Add MD5 C program using Inline::C to a perl program???
by samtregar (Abbot) on Oct 19, 2006 at 18:20 UTC
    I don't think you'll find such an example. XS compiles down to C code just like Inline::C does, so anything you can do in XS you can probably do in Inline::C too, if only by copying the generated XS C code! The critical difference is which one will be easier - XS makes some things easy (mapping complex C types into Perl and back) and Inline::C makes other things easy (writing new code in C).

    -sam