Clear questions and runnable code get the best and fastest answer |
|
PerlMonks |
Re: Overloading assignmentby Zaxo (Archbishop) |
on Oct 26, 2004 at 05:29 UTC ( [id://402467]=note: print w/replies, xml ) | Need Help?? |
Assignment can't really be overloaded. If you say use overload '=' . . .;, you are arranging for a copy constructor for use by mutators like ++, += and so on. To intercept and modify the workings of the assignment operator, you need to use a tied interface, as you seem to be getting at. If you are having trouble with that code, please show what you've tried and what errors you get. After Compline,
In Section
Seekers of Perl Wisdom
|
|