# New Ticket Created by Will Coleda
# Please include the string: [perl #131670]
# in the subject line of all future correspondence about this issue.
# <URL: https://rt.perl.org/Ticket/Display.html?id=131670 >
There are a class of warnings that do not emit their warnings on
$*ERR, but always on the original stderr, which we can see by this
program which should eat both stdout and stderr, and does for most:
$ cat warn.t
use MONKEY-SEE-NO-EVAL;
use IO::String;
my $dummy-io = IO::String.new();
sub MAIN($code) {
$*OUT = $dummy-io;
$*ERR = $dummy-io;
try EVAL $code;
}
$ perl6 warn.t 'warn pi; say e'
$ perl6 warn.t "sink 3"
WARNINGS for /Users/wcoleda001/sandbox/perl6-doc/EVAL_0:
Useless use of constant integer 3 in sink context (line 1)
$ perl6 warn.t 'my $a; my $a'
Potential difficulties:
Redeclaration of symbol '$a'
at /Users/wcoleda001/sandbox/perl6-doc/EVAL_0:1
------> my $a; my $a⏏<EOL>
This might be due to some code in src/Perl6/Actions that needs to be
updated to deal with the fact that the $*ERR and $*OUT might be
overridden.
--
Will "Coke" Coleda