This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Re: [ID 20001122.006] weird behaviour of $|
authorBenjamin Holzman <bah@ecnvantage.com>
Sun, 26 Nov 2000 16:27:33 +0000 (11:27 -0500)
committerJarkko Hietaniemi <jhi@iki.fi>
Mon, 27 Nov 2000 14:53:14 +0000 (14:53 +0000)
Message-ID: <20001126162733.J25040@ecnvantage.com>

p4raw-id: //depot/perl@7890

gv.c

diff --git a/gv.c b/gv.c
index 86d8e79..5c9015d 100644 (file)
--- a/gv.c
+++ b/gv.c
@@ -840,7 +840,6 @@ Perl_gv_fetchpv(pTHX_ const char *nambeg, I32 add, I32 sv_type)
     case ',':
     case '\\':
     case '/':
-    case '|':
     case '\001':       /* $^A */
     case '\003':       /* $^C */
     case '\004':       /* $^D */
@@ -853,6 +852,11 @@ Perl_gv_fetchpv(pTHX_ const char *nambeg, I32 add, I32 sv_type)
        if (len > 1)
            break;
        goto magicalize;
+    case '|':
+       if (len > 1)
+           break;
+       sv_setiv(GvSV(gv), (IV)(IoFLAGS(GvIOp(PL_defoutgv)) & IOf_FLUSH) != 0);
+       goto magicalize;
     case '\017':       /* $^O & $^OPEN */
        if (len > 1 && strNE(name, "\017PEN"))
            break;