On 01/10/02 00:16 -0400, Mitchell N Charity wrote:
> SWIG (http://www.swig.org/) does some nice parsing and glue generation.
> In particular, it has rather broader coverage of C++ than Inline::CPP
> (templates, operators, etc).
>
> Perl's Inline (http://www.perldoc.com/cpan/Inline.html) is sometimes
> more convenient. Particularly for small bits of code. Glue generation,
> compilation, caching, and linking, all happen automagically. And it
> facilitates run-time code generation.
>
> So I wrote an Inline::SWIG
> http://www.vendian.org/mncharity/dir3/inline/swig/
> SWIG's glue inside Inline's process support.
>
> It's a kludge. A concept demo. But I've found it useful.
I took a looksy at Inline::SWIG. I had some ideas for the interface.
If we had a pluggable glue layer, we could do something like:
use Inline C => DATA =>
GLUE => SWIG;
One reason I never liked SWIG for Perl is because it's a non-CPAN dependency.
Now if we could package SWIG up as SWIG.pm, then we could support something
like:
use Inline with => SWIG;
use Inline C;
The SWIG.pm would pass in whatever extra parameters (like the -shadow option)
it wanted including the obvious "GLUE => SWIG".
Cheers, Brian