This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
More doc nits on Switch, and bump version to 2.11 for upcoming CPAN release.
[perl5.git] / universal.c
index e674d50..251fbac 100644 (file)
@@ -69,9 +69,11 @@ S_isa_lookup(pTHX_ HV *stash, const char *name, const HV* const name_stash,
            SV** const svp = (SV**)hv_fetch(hv, name, len, FALSE);
            if (svp) {
                SV * const sv = *svp;
+#ifdef DEBUGGING
                if (sv != &PL_sv_undef)
                    DEBUG_o( Perl_deb(aTHX_ "Using cached ISA %s for package %s\n",
                                    name, hvname) );
+#endif
                return (sv == &PL_sv_yes);
            }
        }
@@ -686,7 +688,14 @@ XS(XS_version_qv)
            if ( SvNOK(ver) ) /* may get too much accuracy */
            {
                char tbuf[64];
-               const STRLEN len = my_snprintf(tbuf, sizeof(tbuf), "%.9"NVgf, SvNVX(ver));
+#ifdef USE_LOCALE_NUMERIC
+               char *loc = setlocale(LC_NUMERIC, "C");
+#endif
+               STRLEN len = my_snprintf(tbuf, sizeof(tbuf), "%.9"NVgf, SvNVX(ver));
+#ifdef USE_LOCALE_NUMERIC
+               setlocale(LC_NUMERIC, loc);
+#endif
+               while (tbuf[len-1] == '0' && len > 0) len--;
                version = savepvn(tbuf, len);
            }
            else