Subject: | changing arrayref doesn't work |
# unwrap-aref.t
use Test::More import => [qw(done_testing is)];
use Data::Visitor::Callback qw();
my $r = [{}];
Data::Visitor::Callback->new(
array => sub {
my (undef, $data) = @_;
($data) = @{ $data };
return $data;
}
)->visit($r);
is ref $r, ref {};
done_testing;