-my @mods = qw(IPC::Run DBI DBD::SQLite);
-foreach my $mod (@mods) {
- eval "require $mod";
- plan skip_all => "missing $mod for $0" if $@;
-};
-IPC::Run->import(qw(run));
-
-my $cmd_pfx = 'blib/script/public-inbox';
-my $tmpdir = tempdir('pi-edit-XXXXXX', TMPDIR => 1, CLEANUP => 1);
-my $mainrepo = "$tmpdir/v2";
+require_mods('DBD::SQLite');
+my ($tmpdir, $for_destroy) = tmpdir();
+my $inboxdir = "$tmpdir/v2";