Install a perl modul in given directory
Sometimes it's handy to install your perl modules into another directory than ~/perl5 or your default directories. Especially if you want to test different versions of a module or need different versions for different apps.
Here is a small bash script to do so: http://pastebin.com/6Kb2xdz7
Copy & save in /usr/local/bin/perl-install-dir (or so)
Usage:
perl-install-dir /opt/my-app DBIx::Simple YAML
or skip tests:
FORCE_INSTALL=1 perl-install-dir /opt/my-app DBIx::Simple YAML
In your perl script:
...
use lib '/opt/my-app/lib/perl5';
use DBIx::Class;
use YAML;
...
Written by Ulrich Kautz
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Perl
Authors
janosgyerik
25.11K
Jean-Remy Duboc
12.22K
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#