You'll need to use a basic program perl2xs (previously known as h2ph, though the functionality is very different) and then modify its output after you've read through
and any other docs that these link to. The program basically creates a frame which you can work with. Numerous examples are provided to get you on your way. It simpler than it sounds but lots of busy work is involved. Sorry.