App-Inspect
view release on metacpan or search on metacpan
use Test2::Bundle::Extended;
use App::Inspect;
sub capture(&) {
my $code = shift;
my $out = "";
my ($ok, $e);
{
local *STDOUT;
($ok, $e) = Test2::Util::try(sub {
open(STDOUT, '>', \$out) or die "Failed to open a temporary STDOUT: $!";
( run in 0.717 second using v1.01-cache-2.11-cpan-65fba6d93b7 )