sub start_helper {
my @argv = @_;
socketpair(my $sock, my $in, AF_UNIX, SOCK_SEQPACKET, 0);
- require PublicInbox::XapHelperCxx;
my $cls = 'PublicInbox::XapHelperCxx';
my $env;
- my $cmd = eval { PublicInbox::XapHelperCxx::cmd() };
+ my $cmd = eval "require $cls; ${cls}::cmd()";
if ($@) { # fall back to Perl + XS|SWIG
- require PublicInbox::XapHelper;
$cls = 'PublicInbox::XapHelper';
# ensure the child process has the same @INC we do:
$env = { PERL5LIB => join(':', @INC) };
SKIP: {
require PublicInbox::XapHelperCxx;
my $cmd = eval { PublicInbox::XapHelperCxx::cmd() };
- skip "XapHelperCxx build: $@", 1 if $@ || $ENV{PI_NO_CXX};
+ skip "XapHelperCxx build: $@", 1 if $@;
@NO_CXX = $ENV{TEST_XH_CXX_ONLY} ? (0) : (0, 1);
my $ar = $test->(@$cmd, '-j0');