On Thu, Jul 21, 2011 at 1:19 AM, Luigi Ballabio <luigi.ballabio@gmail.com> wrote:

On Wed, 2011-07-20 at 17:35 -0700, Stefan Zager wrote:
> That is not correct; perl does not use your __str__ method to
> stringify $self.

Yes, it does.  As I mentioned in my previous post, the SWIG interface
exports a __str__ method.  SWIG notices this and adds to the generated
wrapper for the class the lines

use overload
   '""' => sub { $_[0]->__str__()};

which redefine stringification; and in fact, the simple statement

My mistake; I was not aware of that.  In my opinion, that is a bad feature of SWIG that ought to be removed.  perl is not python.