in reply to A warning about overloading assignment methods

I have simply set a rule for myself that in any function/method/subroutine/whatchawannacallit the very first thing I do is assign the contents of @_ to various temporary variables, no matter how simple the function may be. One simple my($this, $that, @therest) = @_; line will save so many headaches later on, not to mention the way it improves readibility.
Remember rule one...

Replies are listed 'Best First'.
Re^2: A warning about overloading assignment methods
by diotalevi (Canon) on Apr 20, 2005 at 07:29 UTC
    There are occasionally times when you wish to be extra careful to be using an alias to the same variable your caller is using. I was doing lots of that so it was normal and expected for me to be working on things in @_ directly. That isn't the case for most code.