[ID 20020220.002] Perl 5.7.2 porting patches for POSIX 1003.1-2001 hosts
[p5sagit/p5-mst-13.2.git] / gv.c
diff --git a/gv.c b/gv.c
index 53af8a5..a67b36f 100644 (file)
--- a/gv.c
+++ b/gv.c
@@ -1,6 +1,6 @@
 /*    gv.c
  *
- *    Copyright (c) 1991-2001, Larry Wall
+ *    Copyright (c) 1991-2002, Larry Wall
  *
  *    You may distribute under the terms of either the GNU General Public
  *    License or the Artistic License, as specified in the README file.
  * laughed Pippin.
  */
 
+/*
+=head1 GV Functions
+*/
+
 #include "EXTERN.h"
 #define PERL_IN_GV_C
 #include "perl.h"
@@ -72,6 +76,7 @@ Perl_gv_fetchfile(pTHX_ const char *name)
        tmpbuf = smallbuf;
     else
        New(603, tmpbuf, tmplen + 1, char);
+    /* This is where the debugger's %{"::_<$filename"} hash is created */
     tmpbuf[0] = '_';
     tmpbuf[1] = '<';
     strcpy(tmpbuf + 2, name);
@@ -493,7 +498,8 @@ S_require_errno(pTHX_ GV *gv)
        PUTBACK;
        ENTER;
        save_scalar(gv); /* keep the value of $! */
-       require_pv("Errno.pm");
+        Perl_load_module(aTHX_ PERL_LOADMOD_NOIMPORT,
+                         newSVpvn("Errno",5), Nullsv);
        LEAVE;
        SPAGAIN;
        stash = gv_stashpvn("Errno",5,FALSE);
@@ -1296,7 +1302,7 @@ Perl_Gv_AMupdate(pTHX_ HV *stash)
            if (GvNAMELEN(CvGV(cv)) == 3 && strEQ(GvNAME(CvGV(cv)), "nil")
                && strEQ(HvNAME(GvSTASH(CvGV(cv))), "overload")) {
                /* GvSV contains the name of the method. */
-               GV *ngv;
+               GV *ngv = Nullgv;
                
                DEBUG_o( Perl_deb(aTHX_ "Resolving method `%.256s' for overloaded `%s' in package `%.256s'\n",
                             SvPV_nolen(GvSV(gv)), cp, HvNAME(stash)) );