in reply to Interfacing Perl with C++, using XS, with external files, and using the STL as parameters and return values.

For some reason, you entirely missed a tool called "XS++" which started its existence as the Perl-C++ glue for Wx.

Please have a good look, it will most certainly make your life easier wrt. wrapping C++.