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

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

Thread Previous | Thread Next
May 23, 2003 00:06
Re: Can I OVERLOAD the assignment operator? Please???
Message ID:
On Thu, 22 May 2003 20:52:17 -0400, 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 Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About