Dancer-Plugin-FakeCGI
view release on metacpan or search on metacpan
lib/Dancer/Plugin/FakeCGI.pm view on Meta::CPAN
chdir($currWorkDir);
debug("After eval given code() ");
_capture_end();
debug("After _capture_end() ");
}
return $err if ($params->{ret_error});
# When is in CGI called system() function, there is problem with filehandle and it is a blocked, then try to reopen it
sub _reopen_file {
return unless ($_[0]);
close($_[0]) or warn "Can't close IO handler";
open(my $fh, "<:utf8", $_[0]) or die "Can't reopen for reading : $!";
return $fh;
}
# Print captured string on STDERR
if ($capture->{"STDERR"}->{string}) {
debug $capture->{"STDERR"}->{string};
( run in 0.484 second using v1.01-cache-2.11-cpan-49f99fa48dc )