Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some warnings don't respect $*ERR #6365

Open
p6rt opened this issue Jun 28, 2017 · 1 comment
Open

Some warnings don't respect $*ERR #6365

p6rt opened this issue Jun 28, 2017 · 1 comment

Comments

@p6rt
Copy link

p6rt commented Jun 28, 2017

Migrated from rt.perl.org#131670 (status was 'new')

Searchable as RT131670$

@p6rt
Copy link
Author

p6rt commented Jun 28, 2017

From @coke

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant