Skip to content

Latest commit

 

History

History
82 lines (50 loc) · 2.27 KB

README.pod

File metadata and controls

82 lines (50 loc) · 2.27 KB

SYNOPSIS

The /perl directory is where all the database and document processing takes place.

PERL MINIMUM VERSION

Because these scripts use 'Modern::Perl', you'll need at least Perl 5.10 to run them, which won't be a problem if you are on Snow Leopard. However, if your system perl is < 5.10, you can use this script to install a newer, local Perl http://github.com/oalders/wunder-tools/blob/master/perl/install_local_perl.sh

RUNNING SCRIPTS

The database connection is made using a relative path, so you'll find your best success running all scripts from within the /perl directory.

perl script/load_authors.pl
perl script/load_ratings.pl
prove -Ilib -r t
...

CPANMINUS

cpanminus is used in the docs and scripts for module installation. http://search.cpan.org/perldoc?App::cpanminus

MINICPAN

The load_modules script requires the presence of a local minicpan. The minicpan docs can be found here: http://search.cpan.org/perldoc?minicpan

Here's one way to do it. Create a file at ~/.minicpanrc

local: ~/minicpan
remote: ftp://mirror.csclub.uwaterloo.ca/pub/CPAN/
exact_mirror: 1

If you don't have the CPAN::Mini module installed yet:

cpanm CPAN::Mini

Then run the following command:

minicpan

This updates/creates a local copy of CPAN at ~/minicpan. That's it! You can, of course, choose your favourite mirror site instead of this , but this will get you started.

USING MINICPAN AT A DIFFERENT LOCATION

Your minicpan will need to be on a local disk. If it's local but not in your home directory, the easiest fix is to symlink from your home folder to the minicpan:

ln -s /path/to/minicpan ~/minicpan

If this is not workable for you, try setting an environment variable:

EXPORT MINICPAN=/path/to/minicpan

OR:

MINICPAN=/path/to/minicpan perl perl/script/load_modules HTTP::BrowserDetect

REQUIRED CPAN MODULES

You can easily install all required CPAN modules with the install/cpan_modules script.

sh install/cpan_modules.sh

SHRINKING YOUR DB

You can drop an arbitrary number of rows in the module table by using the trim_db.pl script. For example, to keep only the first 1,000 rows:

perl script/trim_db.pl 1000

Make a backup of your db first!