X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=blobdiff_plain;f=t%2Faggregate%2Funit_core_script_server-without_modules.t;h=d6bbcaff960c1ed2183f3126b40d919f0f52a917;hp=c5588bcd28f8cc3cc6d29ed9e69daeab35d36f19;hb=10542b5178b2fa036e0658111523ea68a7a04437;hpb=bf6a63682503ce9d2e6f949a381f3d12cab6ffa4 diff --git a/t/aggregate/unit_core_script_server-without_modules.t b/t/aggregate/unit_core_script_server-without_modules.t index c5588bc..d6bbcaf 100644 --- a/t/aggregate/unit_core_script_server-without_modules.t +++ b/t/aggregate/unit_core_script_server-without_modules.t @@ -1,28 +1,28 @@ use strict; use warnings; use FindBin qw/$Bin/; + +# Package::Stash::XS has a weird =~ XS invocation during its compilation +# This interferes with @INC hooks that do rematcuing on their own on +# perls before 5.8.7. Just use the PP version to work around this. +BEGIN { $ENV{PACKAGE_STASH_IMPLEMENTATION} = 'PP' if $] < '5.008007' } + use Test::More; use Try::Tiny; -plan skip_all => "Need Test::Without::Module for this test" - unless try { require Test::Without::Module; 1 }; - -use Test::Without::Module qw( - Starman +my %hidden = map { (my $m = "$_.pm") =~ s{::}{/}g; $m => 1 } qw( + Starman::Server Plack::Handler::Starman MooseX::Daemonize MooseX::Daemonize::Pid::File MooseX::Daemonize::Core ); -require "$Bin/../aggregate/unit_core_script_server.t"; +local @INC = (sub { + return unless exists $hidden{$_[1]}; + die "Can't locate $_[1] in \@INC (hidden)\n"; +}, @INC); -Test::Without::Module->unimport(qw( - Starman - Plack::Handler::Starman - MooseX::Daemonize - MooseX::Daemonize::Pid::File - MooseX::Daemonize::Core -)); +do "$Bin/../aggregate/unit_core_script_server.t" + or die $@ || 'test returned false'; 1; -