in reply to lvalues in perl prior to 5.16.3 throws "Can't modify reference constructor in lvalue subroutine return"
Works for in all versions I've tried, and I tried as far back as 5.8.8.
Test:
perl -MTie::Scalar -le' sub make { return sub :lvalue { tie my $tied, "Tie::StdScalar"; return $tied; } } my $f = make(); $f->() = 4; '
If you beg to differ, please provide code that demonstrates the problem. What you posted doesn't run.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: lvalues in perl prior to 5.16.3 throws "Can't modify reference constructor in lvalue subroutine return"
by hurricup (Pilgrim) on Jan 23, 2015 at 05:38 UTC |