Hosting documentation/Scripting languages

From Bioinformatics.Org Wiki

Jump to: navigation, search

Hosted projects can make use of a variety of scripting languages and their associated packages. For example, you can build MVC style web-applications using:

All driven from a variety of delicious database backends.


Perl modules are notoriously difficult to centrally maintain on shared project servers. For this reason, and because of RedHat's slightly less than shiny reputation with managing Perl distributions, we recommend individual projects to install LOCAL copies of all Perl modules.

Oh no, bootstrap local-lib, you cry? Not so, it's much easier these days using mcpan.

Within your project directory, you can do the following:

## Step 1, install a local cpanm (and some deps)
curl -k -L \
    | perl - -l local-lib App::cpanminus

This pulls down cpanm from the web, and runs it though Perl with two options, 1) telling it to install everything it needs into a directory called local-lib, and 2) telling it to install itself!

If you know what you are doing, some variant of the above is all you need. But I like to have local::lib around to help set up my shell configuration:

## Step 2, install local::lib
./local-lib/bin/cpanm \
    -l local-lib local::lib

If you understood step 1, this should now be clear. So...

## Step 3, get local::lib to write out some handy config...
perl \
    -Ilocal-lib/lib/perl5/ \
    -Mlocal::lib=`pwd`/local-lib \
## and don't forget to 'source' the resulting config into your shell!

Seriously, don't forget that step. Put it in your diary, put it on your wall, put it in your .bashrc.

Finally, install any packages you need using cpanm, which is conveniently now in your path, and will conveniently use the 'local-lib' directory:

## Step 4, install Foo::From::CPAN

Now if this is an Apache web-app, you'll need to put the above configuration into your apache.conf ... or .htaccess ... if that is being used... SetEnv ... OK?



Personal tools
wiki navigation