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

Re: Can I OVERLOAD the assignment operator? Please???

Thread Previous | Thread Next
John Peacock
May 22, 2003 17:54
Re: Can I OVERLOAD the assignment operator? Please???
Message ID:
Dan Sugalski wrote:
> That's something I think you can't do, and arguably a bug. I'm pretty 
> sure you can have tie magic, or overloading magic, but not both.

So that is a vote in favor???  ;~)

As I understand it, the reason you cannot mix your magics is that overload only 
operates on RV's, so there is no magic table to lookup the set magic callback 
from.  There is no reason to *fully* emulate tie, since there is already a get 
magic (overload stringify/numify) that covers that case.


John Peacock
Director of Information Research and Technology
Rowman & Littlefield Publishing Group
4720 Boston Way
Lanham, MD 20706
301-459-3366 x.5010
fax 301-429-5747

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About