in reply to A warning about overloading assignment methods

If you produce a copy constructor by overloading '=', I believe the reflexive mutators will be autogenerated to do the right thing. There is explanation on pp 7-8,14 of perldoc overload.

After Compline,
Zaxo

  • Comment on Re: A warning about overloading assignment methods

Replies are listed 'Best First'.
Re^2: A warning about overloading assignment methods
by diotalevi (Canon) on Apr 20, 2005 at 06:23 UTC
    I found much of that goop called documentation unintelligible and have implemented methods for -, -=, and =. I only see this problem in -=. The portions covering this part of overload just weren't clear on what they meant. Also, while there were some general warnings about taking references to $_[0] there was nothing about the contents of data structures being magically altered when references to $_[0] were present.