Yes, it compiles for me, but to your point I'll clean up the declarations within the post. I've been using C++ a lot more than C lately, and given the similarities in syntax between the two it starts to get easy to let one leak into the other. I learned Portuguese as a second language, and then picked up Spanish along the way a few years later. Both being romance languages, there are enough similarities that I found it necessary to concentrate on not slipping a Portuguese-specific word into my Spanish.
Thanks for taking a look at it. This is the sort of thing that if I'm going to invest the time in learning it, I want to learn it right.
I considered picking up the Extending and Embedding Perl book, but given that it came along before 5.8.8 (I think), there have been changes to XS since then that might make the book more trouble than it's worth. If anyone reading this knows otherwise let me know and I'll probably go pick up a copy somewhere. Meanwhile, POD, tinker, and more POD.