This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Update Test-Simple to CPAN version 1.302166
[perl5.git] / mro_core.c
index d1abc28..c22e337 100644 (file)
@@ -790,7 +790,7 @@ Perl_mro_package_moved(pTHX_ HV * const stash, HV * const oldstash,
        if (name_count < 0) ++namep, name_count = -name_count - 1;
     }
     if (name_count == 1) {
-       if (HEK_LEN(*namep) == 4 && strnEQ(HEK_KEY(*namep), "main", 4)) {
+       if (memEQs(HEK_KEY(*namep), HEK_LEN(*namep), "main")) {
            namesv = GvNAMELEN(gv) == 1
                ? newSVpvs_flags(":", SVs_TEMP)
                : newSVpvs_flags("",  SVs_TEMP);
@@ -812,7 +812,7 @@ Perl_mro_package_moved(pTHX_ HV * const stash, HV * const oldstash,
        SV *aname;
        namesv = sv_2mortal((SV *)newAV());
        while (name_count--) {
-           if(HEK_LEN(*namep) == 4 && strnEQ(HEK_KEY(*namep), "main", 4)){
+           if(memEQs(HEK_KEY(*namep), HEK_LEN(*namep), "main")){
                aname = GvNAMELEN(gv) == 1
                         ? newSVpvs(":")
                         : newSVpvs("");
@@ -863,7 +863,7 @@ Perl_mro_package_moved(pTHX_ HV * const stash, HV * const oldstash,
               mro_gather_and_rename set aside for us) this way, in case
               one class in this list is a superclass of a another class
               that we have already encountered. In such a case, meta->isa
-
+              will have been overwritten without old entries being deleted
               from PL_isarev. */
            struct mro_meta * const meta = HvMROMETA(stash);
            if(meta->isa != (HV *)HeVAL(iter)){