]> git.vpit.fr Git - perl/modules/Sub-Nary.git/blobdiff - Nary.xs
Fix discrepancy between add('list',1) and add({list=>1},1) in favor of the latter
[perl/modules/Sub-Nary.git] / Nary.xs
diff --git a/Nary.xs b/Nary.xs
index 95fca936f633ac054718d4f3ab0d9582bddcdb15..bcdde48999c3c4fc881ee43c181495fe4ca9d3c7 100644 (file)
--- a/Nary.xs
+++ b/Nary.xs
@@ -171,17 +171,11 @@ CODE:
   if (!SvOK(cur))
    continue;
   if (!SvROK(cur)) {
-   if (strEQ(SvPV_nolen(cur), "list")) {
-    hv_clear(res);
-    sn_store(res, "list", 4, newSVuv(1), sn_hash_list);
-    break;
-   } else {
-    NV v = 1;
-    if ((old = hv_fetch_ent(res, cur, 1, 0)) && SvOK(val = HeVAL(old)))
-     v += SvNV(val);
-    sn_store_ent(res, cur, newSVnv(v), 0);
-    continue;
-   }
+   NV v = 1;
+   if ((old = hv_fetch_ent(res, cur, 1, 0)) && SvOK(val = HeVAL(old)))
+    v += SvNV(val);
+   sn_store_ent(res, cur, newSVnv(v), 0);
+   continue;
   }
   cur = SvRV(cur);
   hv_iterinit((HV *) cur);