File: unit_core_script_server-without_modules.t

package info (click to toggle)
libcatalyst-perl 5.90132-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 3,016 kB
  • sloc: perl: 11,061; makefile: 7
file content (28 lines) | stat: -rw-r--r-- 770 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
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;

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
);
local @INC = (sub {
  return unless exists $hidden{$_[1]};
  die "Can't locate $_[1] in \@INC (hidden)\n";
}, @INC);

do "$Bin/../aggregate/unit_core_script_server.t"
  or die $@ || 'test returned false';

1;