File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -11,7 +11,6 @@ verbose = 11
1111[-RegularExpressions::RequireExtendedFormatting]
1212[-RegularExpressions::RequireLineBoundaryMatching]
1313[-Subroutines::ProhibitExplicitReturnUndef]
14- [-ValuesAndExpressions::ProhibitAccessOfPrivateData]
1514[-ValuesAndExpressions::ProhibitNoisyQuotes]
1615[-Variables::ProhibitPunctuationVars]
1716
Original file line number Diff line number Diff line change @@ -22,8 +22,13 @@ sub index_mirrors {
2222 my $ua = LWP::UserAgent-> new;
2323 log_info { ' Getting mirrors.json file from ' . $self -> cpan };
2424
25- my $json = $self -> cpan-> file( ' indices' , ' mirrors.json' )-> slurp;
26- my $type = $self -> index -> type(' mirror' );
25+ my $json = $self -> cpan-> file( ' indices' , ' mirrors.json' )-> slurp;
26+ my $type = $self -> index -> type(' mirror' );
27+
28+ # Clear out everything in the index
29+ # so don't end up with old mirrors
30+ $type -> delete ;
31+
2732 my $mirrors = Cpanel::JSON::XS::decode_json($json );
2833 foreach my $mirror (@$mirrors ) {
2934 $mirror -> {location }
You can’t perform that action at this time.
0 commit comments