CPAN-Smoker-Utils
view release on metacpan or search on metacpan
bin/mirror_cleanup view on Meta::CPAN
if ($version_check) {
print "mirror_cleanup - version $VERSION\n";
exit(0);
}
print "Reloading CPAN client indexes...\n";
CPAN::HandleConfig->load;
CPAN::Shell::setup_output;
CPAN::Index->force_reload;
print "Starting cleanup...\n";
my $self = scalar( getpwuid($<) );
my $dbfile = "/home/$self/.cpan/cpandb.sql";
my $dbh = DBI->connect( "dbi:SQLite:dbname=$dbfile", "", "" );
my $query_distros = $dbh->prepare(
q{select A.dist_file from dists A join auths B on A.auth_id = B.auth_id where B.cpanid = ?}
);
my $query_authors = $dbh->prepare(q{select cpanid from auths});
$query_authors->execute();
my $removed = 0;
my $minicpan_root = get_root();
( run in 0.231 second using v1.01-cache-2.11-cpan-8d75d55dd25 )