* Father Chrysostomos <sprout@cpan.org> [2011-06-06 05:25]:
> Lvalue subs, as far as I can tell, have always copied read-only
> scalars returned in pass-by-reference context (in for(...) or a sub’s
> arguments). This seems odd to me. I thought the whole point of lvalue
> subs was to return the actual result of the last statement, and not
> a copy of it.
>
> Just as
>
> for($$) {
> $_ = 1
> }
>
> is an error, should not the same apply to this?
>
> for(sub :lvalue { $$ }) {
> $_ = 1
> }
Yes.
This got warnocked. I think this is the direction already taken in the
meantime – right?
Thread Previous
|
Thread Next