in reply to Re^4: Shouldn't references be readonly?
in thread Shouldn't LITERAL references be readonly? (updated)
Having had a further look at your OP, you seem to be complaining that the scalar ref value should readonly - I was thinking that you were wanting the anonymous array to readonly?
So is the following a correct summary of your position as to how you would like things to work?
[ 1, 2, 3]; # a readonly temporary reference to a mutable anonymous a +rray [ 1, 2, $x]; # also a readonly temporary reference to a mutable anonym +ous array bless 'Foo', [1,2,3];# a readonly temporary reference to a mutable ano +nymous array # where the array was mutated by blessing it $a = [1, 2, 3]; # $a is a rw copy of the temp ro array reference
Dave.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^6: Shouldn't references be readonly?
by LanX (Saint) on Aug 05, 2020 at 18:44 UTC | |
Re^6: Shouldn't references be readonly?
by LanX (Saint) on Aug 05, 2020 at 20:29 UTC | |
by haukex (Archbishop) on Aug 05, 2020 at 20:49 UTC | |
by Fletch (Bishop) on Aug 05, 2020 at 21:16 UTC | |
by LanX (Saint) on Aug 05, 2020 at 21:11 UTC |
In Section
Seekers of Perl Wisdom