Add new tests for keys in %+ and %-
[p5sagit/p5-mst-13.2.git] / universal.c
index aa1bd66..d07ff2f 100644 (file)
@@ -1,7 +1,7 @@
 /*    universal.c
  *
  *    Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
- *    2005, 2006, by Larry Wall and others
+ *    2005, 2006, 2007 by Larry Wall and others
  *
  *    You may distribute under the terms of either the GNU General Public
  *    License or the Artistic License, as specified in the README file.
@@ -109,7 +109,7 @@ S_isa_lookup(pTHX_ HV *stash, const char *name, const HV* const name_stash,
            I32 items = AvFILLp(av) + 1;
            while (items--) {
                SV* const sv = *svp++;
-               HV* const basestash = gv_stashsv(sv, FALSE);
+               HV* const basestash = gv_stashsv(sv, 0);
                if (!basestash) {
                    if (ckWARN(WARN_MISC))
                        Perl_warner(aTHX_ packWARN(WARN_SYNTAX),
@@ -157,11 +157,11 @@ Perl_sv_derived_from(pTHX_ SV *sv, const char *name)
        stash = SvOBJECT(sv) ? SvSTASH(sv) : NULL;
     }
     else {
-        stash = gv_stashsv(sv, FALSE);
+        stash = gv_stashsv(sv, 0);
     }
 
     if (stash) {
-       HV * const name_stash = gv_stashpv(name, FALSE);
+       HV * const name_stash = gv_stashpv(name, 0);
        return isa_lookup(stash, name, name_stash, strlen(name), 0);
     }
     else
@@ -362,7 +362,7 @@ XS(XS_UNIVERSAL_can)
             pkg = SvSTASH(sv);
     }
     else {
-        pkg = gv_stashsv(sv, FALSE);
+        pkg = gv_stashsv(sv, 0);
     }
 
     if (pkg) {
@@ -411,7 +411,7 @@ XS(XS_UNIVERSAL_VERSION)
         pkg = SvSTASH(sv);
     }
     else {
-        pkg = gv_stashsv(ST(0), FALSE);
+        pkg = gv_stashsv(ST(0), 0);
     }
 
     gvp = pkg ? (GV**)hv_fetchs(pkg, "VERSION", FALSE) : NULL;
@@ -498,7 +498,7 @@ XS(XS_version_new)
 
        rv = new_version(vs);
        if ( strcmp(classname,"version") != 0 ) /* inherited new() */
-           sv_bless(rv, gv_stashpv(classname,TRUE));
+           sv_bless(rv, gv_stashpv(classname, GV_ADD));
 
        PUSHs(sv_2mortal(rv));
        PUTBACK;