Commit | Line | Data |
1a3dd976 |
1 | use strict; |
2 | use warnings; |
3 | use 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. |
8 | BEGIN { $ENV{PACKAGE_STASH_IMPLEMENTATION} = 'PP' if $] < '5.008007' } |
9 | |
1a3dd976 |
10 | use Test::More; |
1b4b5aa5 |
11 | use Try::Tiny; |
12 | |
10542b51 |
13 | my %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 | ); |
20 | local @INC = (sub { |
21 | return unless exists $hidden{$_[1]}; |
22 | die "Can't locate $_[1] in \@INC (hidden)\n"; |
23 | }, @INC); |
1a3dd976 |
24 | |
10542b51 |
25 | do "$Bin/../aggregate/unit_core_script_server.t" |
26 | or die $@ || 'test returned false'; |
1b4b5aa5 |
27 | |
ed7e95f2 |
28 | 1; |