in reply to Re: (MeowChow) Re6: Comprehending Binary :=
in thread Comprehending Binary :=

So at what point does the lvalue method get called, once $thresh goes out of scope, or once the object is accessed, or at some other time?
   MeowChow                                   
               s aamecha.s a..a\u$&owag.print
  • Comment on (MeowChow) Re8: Comprehending Binary :=

Replies are listed 'Best First'.
Re: (MeowChow) Re8: Comprehending Binary :=
by chromatic (Archbishop) on Oct 08, 2001 at 08:54 UTC
    If I understand correctly, you can think of it as roughly akin to a lexical glob assignment. So the lvaluable (lvalued?) method is called on each assignment to $thresh. The moon stays the same, but there are several fingers, each with a different name.
      Good guess. But wrong.

      The method gets called when the binding is first done. At that point the $thresh variable is bound to the lvalue returned by the method call. Thereafter any assignment to $thresh assigns the the original lvalue, which has the effect of assigning to the result of the method call, but without the cost of the method call.