You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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
The text was updated successfully, but these errors were encountered: