Fix DBM module handling broken by #34653.
Marcus Holland-Moritz [Mon, 3 Nov 2008 22:19:47 +0000 (22:19 +0000)]
p4raw-id: //depot/perl@34710

gv.c

diff --git a/gv.c b/gv.c
index d1c2d11..5bf82f2 100644 (file)
--- a/gv.c
+++ b/gv.c
@@ -1213,17 +1213,16 @@ Perl_gv_fetchpvn_flags(pTHX_ const char *nambeg, STRLEN full_len, I32 flags,
                    if ((add & GV_ADDMULTI) && strEQ(nambeg,"AnyDBM_File::ISA")
                        && AvFILLp(av) == -1)
                        {
-                           const char *pname;
-                           av_push(av, newSVpvs(pname = "NDBM_File"));
-                           gv_stashpvn(pname, 9, GV_ADD);
-                           av_push(av, newSVpvs(pname = "DB_File"));
-                           gv_stashpvn(pname, 7, GV_ADD);
-                           av_push(av, newSVpvs(pname = "GDBM_File"));
-                           gv_stashpvn(pname, 9, GV_ADD);
-                           av_push(av, newSVpvs(pname = "SDBM_File"));
-                           gv_stashpvn(pname, 9, GV_ADD);
-                           av_push(av, newSVpvs(pname = "ODBM_File"));
-                           gv_stashpvn(pname, 9, GV_ADD);
+                           av_push(av, newSVpvs("NDBM_File"));
+                           gv_stashpvs("NDBM_File", GV_ADD);
+                           av_push(av, newSVpvs("DB_File"));
+                           gv_stashpvs("DB_File", GV_ADD);
+                           av_push(av, newSVpvs("GDBM_File"));
+                           gv_stashpvs("GDBM_File", GV_ADD);
+                           av_push(av, newSVpvs("SDBM_File"));
+                           gv_stashpvs("SDBM_File", GV_ADD);
+                           av_push(av, newSVpvs("ODBM_File"));
+                           gv_stashpvs("ODBM_File", GV_ADD);
                        }
                }
                break;