[Bioperl-l] Summer of Code project idea: build-out of PopGen::Simulation::Coalescent
Jonathan Leto
jonathan at leto.net
Mon Mar 23 19:59:55 UTC 2009
Howdy,
> It might be worth coordinating some of this with BioLib if there is a C- or
> C++-based library around one can link into (in this case via swig, not XS).
I would suggest looking at the Math::GSL [1] CPAN module for how to
have a CPAN module use SWIG to interface to an existing C/C++ library.
To my knowledge it is the only CPAN module which allows you to
recompile the SWIG bindings via ./Build test (great for development)
but also puts the generated SWIG wrappers in the CPAN distribution so
that end-users do not require SWIG.
I wrote it and spent many months making it build nice on many
platforms, I promise you that you don't want to reinvent that wheel :)
I can also give inspirational advice for Perl+SWIG/XS shenanigans.
Basically SWIG will generate a (mostly) 1-to-1 API with the underlying
C/C++ library and then you write another (hopefully OO) interface on
top of the SWIG-generated API (which uses very non-Perlish call
conventions because C/C++ can only return a single thing from a
function call).
Cheers,
[1] http://search.cpan.org/dist/Math-GSL/
--
[---------------------]
Jonathan Leto
jaleto at gmail.com
More information about the Bioperl-l
mailing list