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

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

Thread Previous | Thread Next
From:
sthoenna
Date:
May 23, 2003 00:06
Subject:
Re: Can I OVERLOAD the assignment operator? Please???
Message ID:
3Jcz+gzkgiXP092yn@efn.org
On Thu, 22 May 2003 20:52:17 -0400, jpeacock@rowman.com wrote:
>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.

How could tie magic (or any other get magic) and overloading coexist?
Doesn't seem like a bug to me.

On the other hand, I can't think of any reason you couldn't combine
set magic and overload.  But that doesn't mean it would work...

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