PERL_MM_USE_DEFAULT
[p5sagit/p5-mst-13.2.git] / mg.c
diff --git a/mg.c b/mg.c
index 4fc2ffc..4e186e0 100644 (file)
--- a/mg.c
+++ b/mg.c
@@ -612,12 +612,16 @@ Perl_magic_get(pTHX_ SV *sv, MAGIC *mg)
        }
        break;
     case '\024':               /* ^T */
+        if (*(mg->mg_ptr+1) == '\0') {
 #ifdef BIG_TIME
-       sv_setnv(sv, PL_basetime);
+            sv_setnv(sv, PL_basetime);
 #else
-       sv_setiv(sv, (IV)PL_basetime);
+            sv_setiv(sv, (IV)PL_basetime);
 #endif
-       break;
+        }
+        else if (strEQ(mg->mg_ptr, "\024AINT"))
+            sv_setiv(sv, PL_tainting);
+        break;
     case '\027':               /* ^W  & $^WARNING_BITS & ^WIDE_SYSTEM_CALLS */
        if (*(mg->mg_ptr+1) == '\0')
            sv_setiv(sv, (IV)((PL_dowarn & G_WARN_ON) ? TRUE : FALSE));
@@ -1894,6 +1898,8 @@ Perl_magic_set(pTHX_ SV *sv, MAGIC *mg)
     case '|':
        {
            IO *io = GvIOp(PL_defoutgv);
+           if(!io)
+             break;
            if ((SvIOK(sv) ? SvIVX(sv) : sv_2iv(sv)) == 0)
                IoFLAGS(io) &= ~IOf_FLUSH;
            else {