-
-
Notifications
You must be signed in to change notification settings - Fork 8
Open
Description
[Edit: See next comment for a related problem where refs-to-refs aren't readonly]
If the thing being Readonly::Cloned is a ref-to-scalar, you get back the scalar, without the reference:
#!/usr/bin/perl
use strict; use warnings; use feature 'say';
use Data::Dumper;
use Readonly ();
my $foo = 42;
my $original = \$foo;
my $copy = Readonly::Clone($original);
say Data::Dumper->new([$original,$copy],["original","copy"])->Dump;
RESULTS:
$original = \42;
$copy = 42;
I'm assuming Readonly::Clone() is intended to have the same API as Clone::clone().
Using Readonly 2.05 with Perl v5.34.0
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels