On 13 November 2013 22:45, Robert Stone <talby@trap.mtview.ca.us> wrote:
        I have spilled some work to
https://github.com/talby-/swig/tree/perl5-directors-minimal representing
a raw translation of the python director system to perl5.  I believe
this attempt should be fully reverse compatible with existing perl code
and fairly cross compatible with python directors.

        I have included documentation updates, test-suite entries for
many of the director tests, and usage examples.  I still have to work
out a destuctor problem, make code style match the existing codebase, do
profiling & coverage checks, and verify portability against perl
versions other than v5.10.

        Before I put much more time into this path, I'd like to know if
it appears to be a sensible approach.

Hi Robert

Excellent, I can't see anything wrong with this approach. 

I was thinking the Perl changes in your talby-perl5-improvements branch is similar to Python's -builtin option where the Proxy class definitions are moved from pure Perl/Python code to C. In Python, the builtin approach is better all round, but not so 100% compatible with existing code (although close). This should sound familiar! Perhaps you would like to bring in the changes from that branch and have it turned on via a similar command line switch to -builtin? That way users get to choose. 

Hopefully you sort out the destructor problem, but if it is not solvable, how about making the directors available only with the -builtin equivalent approach? As it is SWIG 3 and a chance to make fundamental changes, we could even turn the default code generation to be the builtin, with a -nobuiltin / -legacy switch for old code generation which will still work with -noproxy. Given how much work you've done and the improvements you have done, I presume that the various ways to generate code can be combined and incorporated together with command line switches to enable. Does that sound right?