hand apply whitespace mutiliated patch
[p5sagit/p5-mst-13.2.git] / gv.c
diff --git a/gv.c b/gv.c
index 084181d..0a36370 100644 (file)
--- a/gv.c
+++ b/gv.c
@@ -111,6 +111,7 @@ gv_init(GV *gv, HV *stash, char *name, STRLEN len, int multi)
     if (multi)
        GvMULTI_on(gv);
     if (doproto) {                     /* Replicate part of newSUB here. */
+       SvIOK_off(gv);
        ENTER;
        start_subparse(0,0);            /* Create CV in compcv. */
        GvCV(gv) = compcv;
@@ -710,9 +711,9 @@ gv_fetchpv(char *nambeg, I32 add, I32 sv_type)
        goto magicalize;
 
     case '!':
-       if(len > 1)
+       if (len > 1)
            break;
-       if(sv_type > SVt_PV) {
+       if (sv_type > SVt_PV && curcop != &compiling) {
            HV* stash = gv_stashpvn("Errno",5,FALSE);
            if(!stash || !(gv_fetchmethod(stash, "TIEHASH"))) {
                dSP;
@@ -721,7 +722,7 @@ gv_fetchpv(char *nambeg, I32 add, I32 sv_type)
                SPAGAIN;
                stash = gv_stashpvn("Errno",5,FALSE);
                if (!stash || !(gv_fetchmethod(stash, "TIEHASH")))
-                   croak("Can't use %%! because Errno.pm is not avaliable");
+                   croak("Can't use %%! because Errno.pm is not available");
            }
        }
        goto magicalize;