readonly icon indicating copy to clipboard operation
readonly copied to clipboard

@ary = Readonly::Clone @roary gives wrong results

Open jimav opened this issue 7 years ago • 0 comments

Using Readonly.pm version 2.05 with perl v5.26.1

@ary = Readonly::Clone @roary

returns a single reference to the copied data instead of a list of values. As a result, the cloned array always contains only a single value, namely a ref to the desired values.

I suspect the bug is that the ARRAY case in the code should say return @$retval if wantarray; analogous to how it already handles the HASH case.

I'll attach a demo script.

demo.pl.txt

jimav avatar Apr 30 '18 04:04 jimav