For our purposes, `v2' should be interpreted as a public-inbox
format and not as a Perl version (e.g. `use v5.12'). This ensures
v2index-late-dupe.t correctly depends on DBD::SQLite and git
v2.6+ via `require_mods "v2"' instead of requiring Perl v2.x.
On a side note, it's unlikely public-inbox-v3 format will ever
be necessary as the v2 format appears scalable enough; thus we
won't hit v5 and risk conflicting with in-use Perl versions.
However, I'm not ruling out a v2.112 format for (nearly)
transparent v1->v2 migrations.
push @mods, qw(DBD::SQLite Xapian +SCM_RIGHTS);
$mod = 'json'; # fall-through
}
+ if ($mod eq 'v2') {
+ require_git v2.6, $maybe ? $maybe : 0;
+ push @mods, 'DBD::SQLite';
+ next;
+ } elsif ($mod =~ /\Av/) { # don't confuse with Perl versions
+ Carp::croak "BUG: require_mods `$mod' ambiguous";
+ }
if ($mod eq 'json') {
$mod = 'Cpanel::JSON::XS||JSON::MaybeXS||JSON||JSON::PP'
} elsif ($mod eq '-httpd') {