Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: Overloading assignment

by Zaxo (Archbishop)
on Oct 26, 2004 at 05:29 UTC ( [id://402467]=note: print w/replies, xml ) Need Help??


in reply to Overloading assignment

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

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://402467]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (2)
As of 2024-04-26 00:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found