http://qs1969.pair.com?node_id=1153676


in reply to Re: Readonly oddity
in thread Readonly oddity

I just changed:

Readonly my $foo = 'bar'; Readonly my @baz = (qw/glug argh/);

to:

Readonly my $foo => 'bar'; Readonly my @baz => (qw/glug argh/);
And got fine output.

I would ask the initial "Anonymous Monk" poster to please read "perldoc Readonly" a bit more carefully. Thx.

As choroba noted the post did not do a good job of answering the question and the comment with a strike through it was not appropriate. I have taken some time and effort to research the question more carefully and have put some insights that I still feel may be useful in a new separate post in this thread.

Ron

Replies are listed 'Best First'.
Re^3: Readonly oddity
by choroba (Cardinal) on Jan 26, 2016 at 14:23 UTC
    I would ask the initial "Anonymous Monk" poster to please read "perldoc Readonly" a bit more carefully. Thx.
    I'd ask you to please read the OP a bit more carefully. Thx.
    You might have noticed that the script above is subtly broken. I should have written Readonly my $foo => 'bar'
    ($q=q:Sq=~/;[c](.)(.)/;chr(-||-|5+lengthSq)`"S|oS2"`map{chr |+ord }map{substrSq`S_+|`|}3E|-|`7**2-3:)=~y+S|`+$1,++print+eval$q,q,a,