New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

start making 03modlist empty #37

Closed
wants to merge 1 commit into
base: master
from
Jump to file or symbol
Failed to load files and symbols.
+13 −35
Diff settings

Always

Just for now

View
@@ -1074,53 +1074,25 @@ sub rewrite03 {
$self->verbose(1,"No 03modlists exist; won't try to read it");
}
my $date = HTTP::Date::time2str();
my $dbh = $self->connect;
my $sth = $dbh->prepare(qq{SELECT modid, statd, stats, statl,
stati, statp, description, userid, chapterid
FROM mods WHERE mlstatus = "list"
ORDER BY modid});
$sth->execute;
my $cols = $sth->{NAME};
my $data = $self->as_ds($sth);
my $header = sprintf qq{File: 03modlist.data
Description: These are the data that are published in the module
list, but they may be more recent than the latest posted
modulelist. Over time we\'ll make sure that these data
can be used to print the whole part two of the
modulelist. Currently this is not the case.
Description: This was once the "registered module list" but has been retired.
No replacement is planned.
Modcount: %d
Written-By: %s
Date: %s
}, 0+@$data, $PAUSE::Id, $date;
}, 0, $PAUSE::Id, $date;
$list = qq{
package CPAN::Modulelist;
# Usage: print Data::Dumper->new([CPAN::Modulelist->data])->Dump or similar
# cannot 'use strict', because we normally run under Safe
# use strict;
sub data {
my \$result = {};
my \$primary = "modid";
for (\@\$CPAN::Modulelist::data){
my %hash;
\@hash{\@\$CPAN::Modulelist::cols} = \@\$_;
\$result->{\$hash{\$primary}} = \\%hash;
}
\$result;
return {};
}
};
$list .= Data::Dumper->new([
$cols,
$data,
],
["CPAN::Modulelist::cols",
"CPAN::Modulelist::data"]
)->Dump;
1;
};
$list =~ s/^\s+//gm;
View
@@ -153,6 +153,12 @@ subtest "first indexing" => sub {
"our indexer indexed",
);
file_updated_ok(
$result->tmpdir
->file(qw(cpan modules 03modlist.data.gz)),
"our indexer indexed",
);
package_list_ok(
$result,
[
ProTip! Use n and p to navigate between commits in a pull request.