John Peacock <jpeacock@rowman.com> writes: >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. The way normal magic should work is that if a value is (tied) a variable then mg_get() needs to be called if necessary to get the "value" then the magic on the returned value fires the overload. overload then does its stuff and then mg_set gets called to store value back into variable. IIRC something somewhere was looking at something "too early" or expecting its magic to be at front of MG * list. -- Nick Ing-Simmons http://www.ni-s.u-net.com/Thread Previous | Thread Next