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++.
References:
- ExtUtils::XSpp - the implementation
- Module::Build::WithXSpp - a tool for easily creating XS++ CPAN distributions (including step-by-step instructions in the docs)
- Slides from my XS++ talk at YAPC::EU in Pisa
- Math::ThinPlateSpline - a simple real-world example (needs a boost matrix library to compile)
- XSpp::Example - an extra-simple example which is part of the ExtUtils-XSpp distribution. Note: The link may be outdated by the time you visit it, so you may want to simply look at the current ExtUtils-XSpp distribution's examples/ directory instead.
In Section
Meditations