IMHO is

  $a = \$h{"a"};
  print $$a;
  $$a = "xxx\n";
  $a = $h{"a"};
  print $a;

the same as:

  new P1, .PerlHash
  set P0, P1["a"]
  print P0
  set P0, "xxx\n"
  set P2, P1["a"]
  print P2
  end

(PMCs have reference semantics[1])
Shouldn't that print "xxx" as perl5 does? I.e. store the returned PerlUndef in the hash.
And PerlArray too.


leo

[1]
  new P1, .PerlHash
  new P3, .PerlString
  set P3, "yyy\n"
  set P1["a"], P3
  set P0, P1["a"]
  print P0
  set P0, "xxx\n"
  set P2, P1["a"]
  print P2
  end
yyy
xxx



Reply via email to