>>>>> "GB" == Graham Barr <[EMAIL PROTECTED]> writes:

GB> On Fri, Aug 18, 2000 at 12:25:42AM -0400, Chaim Frenkel wrote:
>> As Graham pointed out, is an lvalue sub supposed to act like a tie or
>> like a variable.

GB> Both.

GB> As Damian points out the lvalue sub must return something that can
GB> be used as an lvalue. Normal assignment hen happens.

GB> So the result will be the same as assigning to a variable, if that
GB> variable is tied it can change the resutl value of the assign.

I think we agree.

$foo is a tied variable
$bar is a normal variable

        sub zap : lvalue { return $_[0] ? $foo : $bar }

        zap(1) = 5;     # Goes to tied variable
        zap(0) = 5;     # Normal store

<chaim> 
-- 
Chaim Frenkel                                        Nonlinear Knowledge, Inc.
[EMAIL PROTECTED]                                               +1-718-236-0183

Reply via email to