From: Nick Ing-Simmons [mailto:[EMAIL PROTECTED]
>
>
> Michael G Schwern <[EMAIL PROTECTED]> writes:
> >On Wed, Nov 26, 2003 at 07:40:57PM +0000, Salvador FandiÃo wrote:
> >> A new version of the "C++ support for MakeMaker" patch is ready.
> >
> >The more I think about this the more nervous I get at putting
> all this new
> >functionality into MakeMaker in a part that's not very well understood
> >(XS module building)
>
> Some of us understand it ;-)
Indeed. The interface provided by the -C++ option in xsubpp does make it dead easy to
map a C++ class to the Perl equivalent.
The only issue I had was the lack of generic C++ exception to Perl exception mapping
code. In the end I had to wrap all my XSUBs in something like this
void
SomeClass::SomeMethod()
INIT:
try {
CLEANUP:
}
catch (err & e)
{
// map C++ exception to Perl exception
}
catch (...)
{
// map C++ exception to Perl exception
}
This works fine, but it doesn't half bloat the code.
Paul