]> git.vpit.fr Git - perl/modules/autovivification.git/blobdiff - autovivification.xs
Classify aliasing constructs in the "store" category
[perl/modules/autovivification.git] / autovivification.xs
index 8933e7a6e6ffcb1933199af528b4a75a3b4d34bf..91ba46a8cddfd1f8c439ba63158c517970d995b5 100644 (file)
@@ -299,12 +299,6 @@ STATIC OP *a_pp_rv2hv(pTHX) {
  if (PL_op == oi.root) { /* This means "%$hashref" */
   PL_op->op_ppaddr = oi.old_pp;
  } else if (!SvOK(TOPs)) {
-  if (oi.root->op_flags & OPf_MOD) {
-   SV *hv;
-   POPs;
-   hv = sv_2mortal((SV *) newHV());
-   PUSHs(hv);
-  }
   RETURN;
  }
 
@@ -347,11 +341,11 @@ deref:
  } else if (flags && (PL_op->op_private & OPpDEREF || PL_op == oi.root)) {
   oi.flags = flags & A_HINT_NOTIFY;
 
-  if ((oi.root->op_flags & (OPf_MOD|OPf_REF)) != (OPf_MOD|OPf_REF)) {
-   if (flags & A_HINT_FETCH)
-    oi.flags |= (A_HINT_FETCH|A_HINT_DEREF);
-  } else if (flags & A_HINT_STORE)
+  if (oi.root->op_flags & OPf_MOD) {
+   if (flags & A_HINT_STORE)
     oi.flags |= (A_HINT_STORE|A_HINT_DEREF);
+  } else if (flags & A_HINT_FETCH)
+    oi.flags |= (A_HINT_FETCH|A_HINT_DEREF);
 
   if (PL_op == oi.root)
    oi.flags &= ~A_HINT_DEREF;