In my XS module, I need to make numerous enum's available to perl 
and I'm looking for recommendations on which option to chose to 
implement them.

I've seen two variations, one using h2xs which auto-generated a 
big mess, and another using the ALIAS keyword (borrowed from 
DBI::Oracle).

I can think of two other variations, where one would be creating 
native perl data structures in the .pm file (as part of the build 
process), and another would be dynamically examining the C-based 
library's header files to build the data structures on the fly.

There are probably 10-20 different enum's that I would want to 
incorporate into my XS module, and they change slightly with each 
API revision (every 9-12 months).  Performance and maintainability 
are both important factors.

Can anyone share some insight as to which of the above choices 
would be better or worse?


Thanks for your help,

Marc
-- 
Marc Mettes
CAD Support
Bic Corporation

Reply via email to