bug-texinfo
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: HV and SV problem


From: Gavin Smith
Subject: Re: HV and SV problem
Date: Sat, 7 Jun 2025 09:38:07 +0100

On Fri, Jun 06, 2025 at 07:27:56PM +0100, Gavin Smith wrote:
> Then I suspected something was strange with the way the data structures
> were constructed.  I suspect it would be hard to replicate the loss without
> using XS.
 
After reading through "man perlref" again, I found the 'refaliasing' feature:

    use strict;
    use feature 'refaliasing';
    
    my $hash = {'foo' => 34, 'bar' => 99};
    
    warn $hash->{'foo'};
    warn $hash->{'bar'};
    
    \$hash->{'bar'} = \$hash->{'foo'};
    
    warn "=>\n";
    
    warn $hash->{'foo'};
    warn $hash->{'bar'};

Output:

    Aliasing via reference is experimental at test.pl line 9.
    34 at test.pl line 6.
    99 at test.pl line 7.
    =>
    34 at test.pl line 13.
    34 at test.pl line 14.

This is very confusing, IMO, and not a feature that I can
see that would be useful for us.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]