With a tied scalar, does perl5 access its routines
twice when it does a += ?


I think the lvalueable subroutine should get called twice
in the example, first the left-hand and then the right-hand






Nathan Wiger wrote:
> 
> Damian Conway wrote:
> >
> > The lvalue accessor *shouldn't* be doing the assignment (what if an assignment
> > isn't what I want?).
> >
> > The (overloaded) operator = should do the assignment. To whatever lvalue
> > the lvalue subroutine returns.
> >
> > Or the "assignment" should be done by operator += or operator++ or
> > whatever mutator I'm actually applying to the returned lvalue.
> 
> Good distinctions. So, if I'm reading you right, this won't work?
> 
>    @oldpath = $tree->path('L','R') = ('R');
> 
> Basically, the lvalue sub by your definition is just a "stupid" accessor
> that returns an lvalue. @oldpath, by your definition, would have to
> contain ('R').

-- 
                          David Nicol 816.235.1187 [EMAIL PROTECTED]
           Laziness with responsibility http://www.tipjar.com/kcpm

Reply via email to