On Jul 6, 2005, at 8:09 PM, Sisyphus wrote:
You can just take the xs file (and INLINE.h, if applicable) that
Inline::C
creates and use that to build a normal extension that's not in any way
dependent upon on the Inline module. That saves one the bother of
learning
anything about xs - though it may well be advantageous to be not so
lazy.
If this were my own kludge, that's what I'd do. If it were for a
company project that might have to be maintained by someone else, I'd
lean against it. I'm definitely not going to kludge up glue code I
don't understand and can't trust on a CPAN module that I want other
people to use. You can't go halfway on a search engine library --
it's gotta be hardened for survival in the extremely hostile web
environment. It's gotta run fine in taint mode, no ifs ands or
buts. And since I'm doing a bunch of pointer acrobatics (vulnerable
to attack if I screw up and someone can figure out how to write to
areas of memory that shouldn't be accessed), the C code has to be
cordoned off.
Because of the stuff this module does I had to learn a bunch of
perlguts/perlapi anyway. I'm probably halfway to understanding XS.
If I do decide to go XS, I'll be using the Inline generated files as
templates and learning tools, though.
Marvin Humphrey
Rectangular Research
http://www.rectangular.com/