On Mon, 11 Apr 2005, Tassilo von Parseval wrote:
On Mon, Apr 11, 2005 at 08:34:56PM +0100 Nick Ing-Simmons wrote:
We could do with updating (and making easier to find) the various
tips and tricks of C++/xs.

Which would imply that there is actually an amount of C++/XS tricks available in a variety of places. The only two I know of is perlxs.pod whose information on that matter are fairly puny, and - of course - existing XS modules written in C++ on the CPAN.

What would be some (good) examples of XS modules using C++? Using http://search.cpan.org and

  cpan> i /c\\+\\+/

didn't find anything. I also have an rsync of CPAN which could
be trawled through by gunzipping every distribution and grepping
Makefile.PL for c++, but I didn't try that yet...
Searching on http://perlmonks.org showed a couple relevant threads.
http://perlmonks.org/index.pl?node_id=197028
->http://www.johnkeiser.com/perl-xs-c++.html
 ->http://cpan.org/authors/id/DMR/
http://perlmonks.org/index.pl?node_id=225498
->http://www.xray.mpe.mpg.de/mailing-lists/perl5-porters/2002-12/msg00807.html


For the most part, it's pretty straightforward, but for example how do you deal with passing values into methods by reference? The ampersand (&) has a special meaning for XSUB arguments. And return values with references, since that seems to not work in typemaps (might've been my mistake, though).

Reply via email to