I have an XS file that is rather large. Mostly because it provides the interface between my c types and perl types. Mostly lists and lists of lists. This c library began as a method of writing c programs. Graham Barr gave me the start on putting it into XS and I took off. Since then I've quit writing anything in c and do everything in perl.
It could greatly reduce the amount of xs if I put the capability in the c to create the perl data. I can use the .c generated from the xs as an example. Is it worth this effort? Also I originally designed the c library for writing c programs. After using this for 2+ years I can see where designing for perl, I would have made some changes. (these would have also worked for c programs). I can also see where moving my c library to c++ would even further reduce my xs code. (function overloading). I still have some errors to surface, maybe once in every 1000 uses, but these are very obscure instances and not tested. Is it worth the effort? Do I just keep what I've got and improve? I'm so confused!