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

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

Thread Previous | Thread Next
From:
John Peacock
Date:
May 22, 2003 17:54
Subject:
Re: Can I OVERLOAD the assignment operator? Please???
Message ID:
3ECD70C1.3020703@rowman.com
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

-- 
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


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