By my reading of the documentation, I expect that the $unit variable will not be modified. Note that, however, $unit IS modified.

I do not know if this is a change from previous versions, a documentation issue, an issue in my version/build (5.2.12-pl0-gentoo) or a misunderstanding on my part.

Comments

Posted by Thomas Weidner (thomas) on 2010-05-13T11:43:27.000+0000

The API shows that the fluid interface is used.
So behaviour of code is correct.

Posted by Bishop Bettini (bishop) on 2010-05-13T12:04:13.000+0000

Thanks Thomas for the quick response!

My concern here is not the accuracy of the code, but the precision of the documentation. I fail to see where the documentation mentions or alludes to the fact that the left-hand side of -> will be modified.

And there would be no side effects -- the only variable that would change in that equation is $unit6. The documentation as it exists seems to support that intention.

At a minimum, if the LHS of the operation is modified, I think the docs should note that. Thoughts?

Posted by Thomas Weidner (thomas) on 2010-05-13T12:12:20.000+0000

Docu clearified with r22160

Posted by Thomas Weidner (thomas) on 2010-05-13T12:15:30.000+0000

The manual stated already
{quote}
Dynamic objects support a fluid style of programming, where complex
sequences of operations can be nested without risk of side-effects altering the input
objects
{quote}