File tree 2 files changed +22
-6
lines changed
2 files changed +22
-6
lines changed Original file line number Diff line number Diff line change @@ -5,14 +5,21 @@ use strictures 2;
5
5
6
6
use Test::DependentModules;
7
7
use IO::All;
8
+ use MetaCPAN::Client;
8
9
9
10
1;
10
11
11
12
__PACKAGE__ -> run;
12
13
13
- sub run {
14
- my @deps = Test::DependentModules::_get_deps #
15
- PPI => { exclude => qr / ^(Apache2-SSI|Devel-IPerl|Padre)$ / };
14
+ sub run { # synch with dependent-modules.t
15
+ # # force metacpan to actually return the whole dependents list
16
+ # https://github.com/metacpan/metacpan-client/issues/122
17
+ my $old_fetch = \&MetaCPAN::Client::fetch;
18
+ my $new_fetch = sub { $old_fetch -> ( shift , shift . " ?size=5000" , @_ ) };
19
+ { no warnings ' redefine' ; *MetaCPAN::Client::fetch = $new_fetch ; }
20
+
21
+ my @deps = Test::DependentModules::_get_deps PPI =>
22
+ { exclude => qr / ^(Apache2-SSI|Devel-IPerl|Padre|Devel-Examine-Subs)$ / };
16
23
my $c = MetaCPAN::Client-> new;
17
24
my @reqs = map @{ $c -> release($_ )-> dependency }, @deps ;
18
25
io(" xt/cpanfile" )
Original file line number Diff line number Diff line change @@ -2,14 +2,23 @@ use Test2::V0;
2
2
use strictures 2;
3
3
4
4
use Test::DependentModules ' test_all_dependents' ;
5
+ use MetaCPAN::Client;
6
+
7
+ # synch with DepReqs.pm
5
8
6
9
skip_all " ENV var TEST_DEPENDENTS not set" if not $ENV {TEST_DEPENDENTS };
7
10
8
11
# duplicate error output into an array for later printing
9
12
my @error_log ;
10
- my $old = \&Test::DependentModules::_error_log;
11
- my $new = sub { push @error_log , @_ ; $old -> (@_ ); };
12
- { no warnings ' redefine' ; *Test::DependentModules::_error_log = $new ; }
13
+ my $old_log = \&Test::DependentModules::_error_log;
14
+ my $new_log = sub { push @error_log , @_ ; $old_log -> (@_ ); };
15
+ { no warnings ' redefine' ; *Test::DependentModules::_error_log = $new_log ; }
16
+
17
+ # force metacpan to actually return the whole dependents list
18
+ # https://github.com/metacpan/metacpan-client/issues/122
19
+ my $old_fetch = \&MetaCPAN::Client::fetch;
20
+ my $new_fetch = sub { $old_fetch -> ( shift , shift . " ?size=5000" , @_ ) };
21
+ { no warnings ' redefine' ; *MetaCPAN::Client::fetch = $new_fetch ; }
13
22
14
23
test_all_dependents PPI => {
15
24
exclude => qr / ^(
You can’t perform that action at this time.
0 commit comments