Catalyst-Runtime
view release on metacpan or search on metacpan
t/aggregate/psgi_file.t view on Meta::CPAN
my @command = ($^X, '-I', "$FindBin::Bin/../lib", '-I', "$FindBin::Bin/../../lib", '-c', $path);
open my $stdin, '<', File::Spec->devnull;
my $pid = open3 $stdin, my $stdout, undef, @command;
my $output = do { local $/; <$stdout> };
waitpid $pid, 0;
ok $? == 0, '.psgi compiles'
or diag $output;
# NOTE - YOU *CANNOT* do something like:
#my $psgi_ref = require $path;
# otherwise this test passes!
# I don't exactly know why that is yet, however, to be safe for future, that
# is why this test writes out its own .psgi file in a temp directory - so that that
# path has never been require'd before, and will never be require'd again..
local TestApp->config->{home} = $home;
my $failed = 0;
eval {
# Catch infinite recursion (or anything else)
( run in 0.225 second using v1.01-cache-2.11-cpan-0d8aa00de5b )