]> git.vpit.fr Git - perl/modules/autovivification.git/blobdiff - t/lib/autovivification/TestCases.pm
Also handle old-style dereferencing "$$hashref{key}"
[perl/modules/autovivification.git] / t / lib / autovivification / TestCases.pm
index 19ce7eadaf0e914de688d6eb86f09891b5d621b5..99d6672a2984d6cc51494108e7998371cd2da4a1 100644 (file)
@@ -62,6 +62,10 @@ sub testcase_ok {
  }
  my @base = ([ $var, $init, $code, $exp, $use ]);
  if ($var =~ /\$/) {
+  my @oldderef = @{$base[0]};
+  $oldderef[2] =~ s/\Q$var\E\->/\$$var/g;
+  push @base, \@oldderef;
+
   my @nonref = @{$base[0]};
   $nonref[0] =~ s/^\$/$sigil/;
   for ($nonref[1], $nonref[2]) {