[JVM/interpreter] local STDERR to IO::Scalar does not capture output
Mantenedores costumam responder em até 1 dia
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 4/5
- Tempo estimado
- 3-5 dias
- Facilidade para iniciantes
- 52/100
Direção de pesquisa
Start by tracing how localized typeglob assignments route writes to standard handles in both the JVM and interpreter backends; the issue names no source files or tests in the repository. Reproduce the supplied IO::Scalar case on each backend, then check whether Grep::Query 1.011's t/11-invalid.t passes. Done means both backends capture the diagnostic and pass those acceptance checks.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
Summary
Localizing STDERR to an IO::Scalar handle does not capture output on either PerlOnJava backend.
Reproducer
use strict;
use warnings;
use IO::Scalar;
my $capture = IO::Scalar->new();
{
local *STDERR = $capture;
print STDERR "diagnostic\n";
}
die "diagnostic was not captured" unless "$capture" eq "diagnostic\n";
System Perl captures the diagnostic. PerlOnJava's JVM and interpreter backends leave the buffer empty.
CPAN evidence
- Grep::Query 1.011, CPAN random run
20261111-090841-71684. - System Perl 5.42.2 passes all 490 tests.
- PerlOnJava reports 468/490 passing.
t/11-invalid.tfails 14/21 assertions becauseGrep::Query::ParserlocalizesSTDERRtoIO::Scalarwhile collecting Parse::RecDescent diagnostics; the buffer stays empty and the test seesUNKNOWN ERROR. - The reproducer passes on system Perl and fails on both PerlOnJava backends.
Root cause
The localized STDERR glob does not route writes to the replacement IO::Scalar handle. This prevents callers from retrieving output written through STDERR during the localized scope.
Related work
Issue #2015 covers Capture::Tiny's interpreter failure while duplicating STDOUT. This reproducer exercises direct STDERR localization to IO::Scalar and fails on both backends.
Acceptance criteria
local *STDERR = $captureroutesprint STDERRto the replacement handle on both PerlOnJava backends.- The reproducer and Grep::Query 1.011
t/11-invalid.tpass on system Perl and both PerlOnJava backends.
- Linguagem predominante
- Perl
- Estrelas
- 67
- Forks
- 8
- Merge médio
- 5h 12min
- PRs com merge (30d)
- 131
Preparar o ambiente
- Inclui um Dockerfile ou arquivo Docker Compose
- Sem modelo de pull request
- Ler o guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de fglock/PerlOnJava
-
area:cpan-port bug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 70/100
fglock/PerlOnJava#2153 ·
Mantenedores costumam responder em até 1 dia
-
area:cpan-port area:parser bug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 68/100
fglock/PerlOnJava#2137 ·
Mantenedores costumam responder em até 1 dia
-
area:backend area:cpan-port area:runtime bug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 76/100
fglock/PerlOnJava#2071 ·
Mantenedores costumam responder em até 1 dia
-
area:runtime documentation enhancement
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
fglock/PerlOnJava#1579 ·
Mantenedores costumam responder em até 1 dia
-
area:cpan-port bug
Dificuldade 3/5 1-2 dias Facilidade para iniciantes 62/100
fglock/PerlOnJava#2157 ·
Mantenedores costumam responder em até 1 dia
Todas as issues de fglock/PerlOnJava
Issues semelhantes
-
Dev-output directory preparation accepts file-valued lib/include paths and fails on dangling linksAbertateam-cli
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 70/100
Mantenedores costumam responder em até 2 dias
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 66/100
-
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 93/100
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 73/100
inverse-inc/packetfence#9728 ·
Mantenedores costumam responder em até 1 dia
-
fix(char-create): show the real reason a character is refusedTalvez já em andamento @baphomello assumiu há 1 dia. Aberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 84/100
Mantenedores costumam responder em até 1 dia