Jonathan Scott Duff wrote:
>
> Hrm.  Perhaps you aren't explaining yourself clearly.  Let's pretend
> that there is a magical value called $LVALUE that contains the thing
> being assigned.  Are you saying that in
> 
>         somesub = $value;
> 
> the subroutine C<somesub>, being lvaluable by default is free to use
> or ignore $LVALUE?  If so, how does one detect errors?  When
> C<somesub> is ignoring $LVALUE the above would silently fail, yes?

That's similar to what I'm saying. If you had the sub:

    sub somesub {
        my(@stuff) = @_;
        # do nothing
    }

Then I think both of these should act exactly the same:

    somesub(@values);
    somesub = @values;

According to the RFC, the lvalue sub gets @values in @_ like an rvalue
sub. The two should walk and talk identically. (Scoping aside, see my
email to Nat). In this case, there's nothing special about lvalue subs,
so we should drop :lvalue.

I know that's not how 5.6 works, but it's what the RFC says. See what
I'm saying?

-Nate

Reply via email to