use inlined module hiding in tests
[catagits/Catalyst-Runtime.git] / t / aggregate / unit_core_script_server-without_modules.t
CommitLineData
1a3dd976 1use strict;
2use warnings;
3use FindBin qw/$Bin/;
0f6be50c 4
5# Package::Stash::XS has a weird =~ XS invocation during its compilation
6# This interferes with @INC hooks that do rematcuing on their own on
7# perls before 5.8.7. Just use the PP version to work around this.
8BEGIN { $ENV{PACKAGE_STASH_IMPLEMENTATION} = 'PP' if $] < '5.008007' }
9
1a3dd976 10use Test::More;
1b4b5aa5 11use Try::Tiny;
12
10542b51 13my %hidden = map { (my $m = "$_.pm") =~ s{::}{/}g; $m => 1 } qw(
44cf0958 14 Starman::Server
1a3dd976 15 Plack::Handler::Starman
16 MooseX::Daemonize
17 MooseX::Daemonize::Pid::File
18 MooseX::Daemonize::Core
10542b51 19);
20local @INC = (sub {
21 return unless exists $hidden{$_[1]};
22 die "Can't locate $_[1] in \@INC (hidden)\n";
23}, @INC);
1a3dd976 24
10542b51 25do "$Bin/../aggregate/unit_core_script_server.t"
26 or die $@ || 'test returned false';
1b4b5aa5 27
ed7e95f2 281;