This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Calling "PRINT" on a tied STDERR can use G_DISCARD, as the result is ignored.
authorNicholas Clark <nick@ccl4.org>
Wed, 5 Jan 2011 16:39:50 +0000 (16:39 +0000)
committerNicholas Clark <nick@ccl4.org>
Wed, 5 Jan 2011 20:42:23 +0000 (20:42 +0000)
util.c

diff --git a/util.c b/util.c
index ac7dd57..915a610 100644 (file)
--- a/util.c
+++ b/util.c
@@ -1427,7 +1427,7 @@ Perl_write_to_stderr(pTHX_ SV* msv)
        PUSHs(SvTIED_obj(MUTABLE_SV(io), mg));
        PUSHs(msv);
        PUTBACK;
        PUSHs(SvTIED_obj(MUTABLE_SV(io), mg));
        PUSHs(msv);
        PUTBACK;
-       call_method("PRINT", G_SCALAR);
+       call_method("PRINT", G_SCALAR | G_DISCARD);
 
        POPSTACK;
        FREETMPS;
 
        POPSTACK;
        FREETMPS;