Closed amishHammer closed 7 years ago
It's possible that something in Dancer is hijacking the output handles in an incompatible way. Can you provide an isolated test application that demonstrates the problem?
Here is a minimal example of this not working:
#!/usr/bin/env perl
use Capture::Tiny 'capture_stdout';
use Dancer;
get '/' => sub {
my $capture = capture_stdout { system 'echo', 'world'; };
return "Hello, $capture";
};
dance;
For what it's worth, this is no longer an issue in Dancer2.
If it's fixed in Dancer2, I'm going to close this ticket. Thanks for verifying the two cases.
p5-Capture-Tiny-0.23 perl5-5.16.3_4 p5-Dancer-1.3119_1
This happens when running under dancer only not when running form a simple script.