Capture-Tiny
Capture-Tiny copied to clipboard
No STDERR capture from XS/C under Windows [rt.cpan.org #71701]
https://rt.cpan.org/Ticket/Display.html?id=71701
The attached simple case doesn't capture STDERR in Windows. Seems ok on all other platforms.
It's not clear to me if this is a Windows thing you can't do anything about? This is a minimal
example of a general issue of not capturing STDERR from XS/external libs in windows.
This may be related, so not opening a new ticket, but I am also seeing stderr (not stdout) not being captured from a system statement on Windows only:
use strict;
use warnings;
use 5.010;
use Capture::Tiny qw( capture );
my (undef, $stderr) = capture { system $^X, -e => 'print STDERR "some error"' };
say $stderr; # prints nothing on MSWin32
this does work:
my (undef, $stderr) = capture { print STDERR "some error" };
Could you please post/gist your perl -V output?
https://gist.github.com/plicease/38f40e0bb5392bad42fe
this is a fairly standard Strawberry 5.22.1 install.