3 plan skip_all => <<'END_HELP' unless $ENV{MOO_TEST_MD};
4 This test will not run unless you set MOO_TEST_MD to a true value.
8 all Test every dist which depends on Moose except those
9 that we know cannot be tested. This is a lot of
12 Dist::1,Dist::2,... Test the individual dists listed.
14 MooX Test all Moo extension distros.
16 1 Run the default tests. We pick 200 random dists and
21 use Test::DependentModules qw( test_modules );
25 # avoid any modules that depend on these
26 my @bad_prereqs = qw(Gtk2 Padre Wx);
28 my $mcpan = MetaCPAN::API->new;
29 my $res = $mcpan->post(
30 '/search/reverse_dependencies/Moo' => {
33 query => { "match_all" => {} },
36 { term => { 'release.status' => 'latest' } },
37 { term => { 'release.authorized' => \1 } },
38 { not => { filter => {
40 map { { term => { 'dependency.module' => $_ } } } @bad_prereqs,
48 fields => ['distribution', 'provides', 'metadata.provides'],
53 foreach my $line (<DATA>) {
55 if ($line =~ /^\s*(\S+)?\s*(#|$)/) {
60 die "Invalid entry in DATA section: $line";
64 my @modules = sort grep !/^(?:Task|Bundle|Acme)::/, grep !$bad_module{$_}, map {
65 if (my $provides = $_->{fields}{provides}) {
66 ref $provides ? (sort @$provides)[0] : $provides;
68 elsif (my $provides = $_->{fields}{'metadata.provides'}) {
69 (sort keys %$provides)[0];
72 my $dist = $_->{fields}{distribution};
76 } @{ $res->{hits}{hits} };
78 if ( $ENV{MOO_TEST_MD} eq 'MooX' ) {
79 @modules = grep /^MooX(?:$|::)/, @modules;
81 elsif ( $ENV{MOO_TEST_MD} eq '1' ) {
83 Picking 200 random dependents to test. Set MOO_TEST_MD=all to test all
84 dependents or MOO_TEST_MD=MooX to test extension modules only.
86 @modules = (List::Util::shuffle(@modules))[0..199];
88 elsif ( $ENV{MOO_TEST_MD} ne 'all' ) {
89 my @chosen = split /,/, $ENV{MOO_TEST_MD};
90 my %modules = map { $_ => 1 } @modules;
91 if (my @unknown = grep { !$modules{$_} } @chosen) {
92 die "Unknown modules: @unknown";
97 plan tests => scalar @modules;
98 test_modules(@modules);
106 Novel::Robot::Browser
108 Thrift::API::HiveClient
113 Catmandu::Store::Lucy
114 Dancer2::Session::Sereal
116 HTML::Zoom::Parser::HH5P
117 Message::Passing::ZeroMQ
122 Uninets::Check::Modules::HTTP
123 Uninets::Check::Modules::MongoDB
124 Uninets::Check::Modules::Redis
130 # bad prereq version listed
131 Dancer2::Session::Cookie
132 Dancer2::Session::JSON
134 # broken, pending release
142 # broken by Moo change, reported rt#84035
143 Math::Rational::Approx