Note where (nearly) all the other private non-static functions are used.
[p5sagit/p5-mst-13.2.git] / gv.c
diff --git a/gv.c b/gv.c
index eadeb97..74a9b2e 100644 (file)
--- a/gv.c
+++ b/gv.c
 
 /*
  *   'Mercy!' cried Gandalf.  'If the giving of information is to be the cure
- * of your inquisitiveness, I shall spend all the rest of my days answering
+ * of your inquisitiveness, I shall spend all the rest of my days in answering
  * you.  What more do you want to know?'
  *   'The names of all the stars, and of all living things, and the whole
  * history of Middle-earth and Over-heaven and of the Sundering Seas,'
  * laughed Pippin.
+ *
+ *     [p.599 of _The Lord of the Rings_, III/xi: "The Palantír"]
  */
 
 /*
@@ -150,7 +152,7 @@ Perl_gv_fetchfile_flags(pTHX_ const char *const name, const STRLEN namelen,
 #else
        sv_setpvn(GvSV(gv), name, namelen);
 #endif
-       if (PERLDB_LINE)
+       if (PERLDB_LINE || PERLDB_SAVESRC)
            hv_magic(GvHVn(gv_AVadd(gv)), NULL, PERL_MAGIC_dbfile);
     }
     if (tmpbuf != smallbuf)
@@ -1211,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;
@@ -1408,7 +1409,6 @@ Perl_gv_fetchpvn_flags(pTHX_ const char *nambeg, STRLEN full_len, I32 flags,
        case ')':
        case '<':
        case '>':
-       case ',':
        case '\\':
        case '/':
        case '\001':    /* $^A */
@@ -2156,7 +2156,7 @@ Perl_amagic_call(pTHX_ SV *left, SV *right, int method, int flags)
     PUSHs(MUTABLE_SV(cv));
     PUTBACK;
 
-    if ((PL_op = Perl_pp_entersub(aTHX)))
+    if ((PL_op = PL_ppaddr[OP_ENTERSUB](aTHX)))
       CALLRUNOPS(aTHX);
     LEAVE;
     SPAGAIN;
@@ -2210,25 +2210,6 @@ Perl_amagic_call(pTHX_ SV *left, SV *right, int method, int flags)
 /*
 =for apidoc is_gv_magical_sv
 
-Returns C<TRUE> if given the name of a magical GV. Calls is_gv_magical.
-
-=cut
-*/
-
-bool
-Perl_is_gv_magical_sv(pTHX_ SV *name, U32 flags)
-{
-    STRLEN len;
-    const char * const temp = SvPV_const(name, len);
-
-    PERL_ARGS_ASSERT_IS_GV_MAGICAL_SV;
-
-    return is_gv_magical(temp, len, flags);
-}
-
-/*
-=for apidoc is_gv_magical
-
 Returns C<TRUE> if given the name of a magical GV.
 
 Currently only useful internally when determining if a GV should be
@@ -2243,13 +2224,15 @@ pointers returned by SvPV.
 
 =cut
 */
+
 bool
-Perl_is_gv_magical(pTHX_ const char *name, STRLEN len, U32 flags)
+Perl_is_gv_magical_sv(pTHX_ SV *const name_sv, U32 flags)
 {
-    PERL_UNUSED_CONTEXT;
-    PERL_UNUSED_ARG(flags);
+    STRLEN len;
+    const char *const name = SvPV_const(name_sv, len);
 
-    PERL_ARGS_ASSERT_IS_GV_MAGICAL;
+    PERL_UNUSED_ARG(flags);
+    PERL_ARGS_ASSERT_IS_GV_MAGICAL_SV;
 
     if (len > 1) {
        const char * const name1 = name + 1;
@@ -2327,7 +2310,6 @@ Perl_is_gv_magical(pTHX_ const char *name, STRLEN len, U32 flags)
        case ')':
        case '<':
        case '>':
-       case ',':
        case '\\':
        case '/':
        case '|':