----- Original Message -----
From: "Jonathan Scott Duff" <[EMAIL PROTECTED]>
Sent: Wednesday, August 16, 2000 10:00 AM
Subject: Re: Make lvalue subs the default (was Re: RFC 107 (v1) lvalue subs
should receive the rvalue as an argument)


> On Wed, Aug 16, 2000 at 12:14:09AM -0700, Nathan Wiger wrote:
> > No problem. In fact, this fits under your rules. HOWEVER, it also
> > assumes that Lincoln thought that param() was :lvalue-worthy. What if he
> > forgot? Or didn't think of this case?
>
> Then you email him with a patch, and your reasons why your lvalue
> patch should be applied.
Or, if you prefer, patch your local copy without emailing Lincon.  Or do an
attributes(&CGI::param) |= :lvalue; (assuming synthax that hasn't been
RFCed, but...)

However, I think that this can all be solved fairly simply, by intergrating
it with the other problem: that functions wouldn't be able to tell the
diference between their lvalue and rvalue values.

Now, I rather like Buddha Buck's solution, of making the lvalue attribute
take the variable name the rvalue should be passed in.  However, for those
still of the mind that all subs should be lvalueable, might I propose that a
sub foo, called as foo(@a) = @b gets its @_ as @a,@b, as proposed in the
RFC, with the twist that the elements of @b are passed with a :rvalue
attribute, so that foo can care if it wants to, but if it doesn't, the
lvalue call will "simply work" without any further ado.  Note also that this
means that :no_lvalue can be written in pure perl.

    -=- James Mastros

Reply via email to