develooper Front page | perl.perl5.porters | Postings from May 2008

method call overloading: test 1

From:
Ricardo SIGNES
Date:
May 16, 2008 06:07
Subject:
method call overloading: test 1
Message ID:
20080516130636.GA33117@knight.local

Attached is a very simple test for overloaded method invocation.  It's a simple
classless scheme, with tests for both the underlying call and then how it
should work if ->method can be overloaded.

I called the overload type 'invoke_method' but I am not too concerned with
what it's called, as long as it works!

In the data block of the code is an example of what the code could look like if
written natively, instead of having the calling abstracted out.

-- 
rjbs



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About