On Nov 16, 2010, at 9:15 PM, Andreas J. Koenig wrote:
Show quoted text> What jumps into the eye is that in the testscript t/sysinfo_proc.t the
> use of tie() happens before the package is parsed.
What jumps into *my* eye is that it says tie $handle and $handle is a scalar. It should be tie *$handle.
tie $handle used to tie a handle if a typeglob had been assigned to $handle. I consider this change to be a bug fix (but feel free to remonstrate if you disagree).
The main problem here in 5.12 and earlier is that tied $scalar cannot reliably be used to see whether a scalar is tied, because a typeglob might have been assigned to or returned from it. The same happens with untie $scalar, which may or may not work, depending on what was last assigned. I fixed those and also made tie() match. This means that tie $scalar will always tie a scalar, and, if the scalar has been used before, you don’t have to check its value to see whether you need to undefine it to be able to tie it.