On Mon, Aug 09, 2004 at 01:18:32PM -0400, [EMAIL PROTECTED] wrote: > Not sure. I'm not lookig for advice on evolving this module for > perl5; it's gross and cumbersome, but I am not about to make deep > changes to it. I'd much rather do it right for parrot, specially > since I won't have to support that at work (as in: 7*24 beeper > support). Doing deep surgery on the perl XS module would require that > kind of support burden, as it is extremely heavily used in production, > despite all its warts.
ExtUtils::Constant was written to help resolve the mess that h2xs made with the switch statements for constants. It might make nicer code, coupled with a slightly different AUTOLOAD. But it might also be violating your wise "don't mess with this" mantra. (Potential conflict of interest - note who the author of ExtUtils::Constant is.) The code is messy and needs refactoring so that it can be subclassed to generate lookup tables that return other sorts of structures, such as potentially the token lookup in the perl5 core, and the NCI signature lookup in nci.c, which is currently a linear search. Erk! Nicholas Clark