You thought the variable was being passed directly, so you believed the SV was being passed by reference. In the same breath, you said tied variables don't work because SVs are passed by value. I called fouled on the latter, so I don't see how the typical practices of subs are of any consequence here.
Furthermore, we weren't talking about subs, so the typical practices for writing subs are completely irrelevant. (Builtin and other XS) functions access the SV directly until a specific native type is needed. I don't think I've ever seen one that copies the arguments on entry. Remember, the primary purpose of copying the args in subs is to provide named parameters, but functions already have named parameters.
In reply to Re^4: Using a tied scalar as an in memory file
by ikegami
in thread Using a tied scalar as an in memory file
by duncs
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |