my $datacopy = $MySafe::data; bless $datacopy->{person}, 'Person'; #### bless $datacopy->{person}, ref $datacopy->{person}; #### ref($_) and bless($_, ref $_) for values %$datacopy; #### $string = <<'EOM'; { 'person' => bless( [ 42 ], 'Person' ) }; EOM my $data = Safe->new()->reval($string); ref($_) and bless($_, ref $_) for values %$data;