> Good distinctions. So, if I'm reading you right, this won't work?
   > 
   >    @oldpath = $tree->path('L','R') = ('R');

It means:

        @oldpath = $tree->patch('L','R')->OP_=('R');

So it will work fine, if that's what you intended. :-)


   > 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').

Unless some OP_= method was overloaded somewhere in the expression.
(And it *might* be ARRAY::OP_= that was overloaded! ;-)


   > My feeling is that $tree->path should be able to do anything it wants,
   > including returning a different value than was passed in. Otherwise, you
   > can't chain stuff together above, which is potentially really useful
   > (especially for us really lazy types).
   > 
   > I'd like to see both supported, but this does seem to require different
   > mechanisms. Maybe some combination of :lvalue and lreturn could
   > accomplish this?

Then propose it. Personally, I think it's dead wrong, but what does that
mean? *Larry* may love it.

Damian

Reply via email to