diff options
author | Franck Cuny <franck.cuny@gmail.com> | 2013-09-28 15:12:03 -0700 |
---|---|---|
committer | Franck Cuny <franck.cuny@gmail.com> | 2013-09-28 15:12:03 -0700 |
commit | 3b95d4aec6334b0e18eed433120fd549eaa5fa36 (patch) | |
tree | dc849b8a5e5414cda9bd7836a7b356f4948015c1 /download_sqlite.pl | |
download | cpan-explorer-3b95d4aec6334b0e18eed433120fd549eaa5fa36.tar.gz |
import cpan-explorer master
Diffstat (limited to 'download_sqlite.pl')
-rw-r--r-- | download_sqlite.pl | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/download_sqlite.pl b/download_sqlite.pl new file mode 100644 index 0000000..1c7e988 --- /dev/null +++ b/download_sqlite.pl @@ -0,0 +1,19 @@ +#!/usr/bin/perl +use strict; +use warnings; +use DBI; +my @drivers = DBI->available_drivers(); +die "Error, please install DBI::SQLite" unless (grep { $_ eq "SQLite" } @drivers); + +print "Downloading the full CPAN tester database, around 13 MB.."; +#`wget http://cpants.perl.org/static/cpants_all.db.gz`; +die "Error, couldn't download the cpants_all.db.gz file from http://testers.cpan.org!" unless -p 'cpants_all.db.gz'; +say "done"; + +print "Unpacking CPAN tester database.."; +`gunzip cpants_all.db.gz`; +die "Error, couldn't unpack the cpants_all.db.gz file!" unless -p 'cpants_all.db'; +#`rm cpants_all.db.gz`; +#die "Warning, couldn't remove the cpants_all.db.gz file" if -p 'cpants_all.db'; +say "done"; + |