----- Original Message ----- From: "Marvin Humphrey" <[EMAIL PROTECTED]> To: "Sisyphus" <[EMAIL PROTECTED]> Cc: <inline@perl.org> Sent: Thursday, July 07, 2005 2:39 PM Subject: Re: Insecure dependency error in Taint mode
> 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. It's not really a kludge ... it's a little cumbersome ..... but that's a totally different thing :-) What I was suggesting is that you can have your module as a normal cpan module. There'll be the '.pm' file (one that does not use Inline in any shape or form), the Makefile.PL, and the '.xs' file (along with other files normally included in a cpan distro) - and it will build as per the normal procedure, and it won't have any dependency upon the Inline module. But the xs file will have been written for you by the Inline::C module. That "normal cpan module" is the source that others might have to maintain - certainly not a good idea to force them to maintain the code by making them use Inline::C to generate the xs code. It's best left up to them to determine how they want to maintain this "normal cpan module". Or you can take the trouble to learn how to write xs files.... and then write the exact same xs file that Inline::C would have produced for you !!! That's an oversimplification, of course. There's more than one way to write an XS file, and you may choose to write it differently to the way Inline::C does. And, XS doesn't automatically have the Inline Stack macros (which are defined in INLINE.h). But .... why bother to learn how to do something that Inline::C is capable of doing for you anyway ? (I suspect that's *not* a rhetorical question - there are possibly good reasons to learn XS - eg there maybe things you can do with XS that can't be achieved with Inline::C. I've not yet come across such a case, however.) Mind you, there's not much learning required to be able to write the type of XS file that Inline::C creates - it's just the Inline::C code followed by additional stuff that is tedious and boring (rather than difficult) to write. I actually frequently use Inline::C as little more than an XS file generator - though I've gone to the trouble of automating the procedure. Certainly wouldn't want to do it by hand .... that would be far too much of a kludge .... ummm .... I mean far too cumbersome. Suits me fine - the main thing is that I find code development is so convenient with Inline::C, and that's why I like it so much. Cheers, Rob