set up your local mirror if you want, and stick the details in ~/.cpan/CPAN/MyConfig.pm
perl Makefile.PL && make && make installdeps
install a module in yoru working copy to play with
./script/locallib-cpan --install Some::Module
script/env works the same way as suggested below
this version doesn't have the catalyst stuff in it, so you can use it for other stuff ...
TODO perhpas I should track modules installed for playing with ... then add them to the Makefile.PL
TODO have it handle scripts installed from cpan ( those under bin/ ) so they work right with the local lib
TODO add stuff to handle Module::Starter and catalyst.pl so i can create an app in this dir (again messing with the scripts!)
Catalyst scripts to use local::lib
NOTE: You need the latest version of local::lib for this to work.
git clone git://github.com/bobtfish/catalyst-app-example-locallibapp.git cd catalyst-app-example-locallibapp # To bootstrap local::lib, runs your Makefile.PL, runs make installdeps ./script/bootstrap.pl # And go! ./script/catalyst-server.pl
Makefile.PL, and script/myapp_server.pl hav been edited as documented in script/env to enable local::lib mode
Additional scripts available:
- env - The core script, does all the magic.
bootstrap.pl - create initial local-lib5 directory
shell.sh - a bash shell with this app's local::lib setup NOT SELF CONTAINED
perl.pl - run perl with this app's local::lib setup
cpan-install.pl - Install a specific module from CPAN
- cpan-shell.sh - perl -MCPAN -eshell
Note about self contained mode:
We try to do everything in local::libs --self-contained mode so that everything which is a non-core dependency is bundled for you, and you will only see the core module and the contents of your local::lib
However, only perl scripts directly under our control can be forced into this mode.
The correct way to install dependencies in a local::lib based application is to add them to your Makefile.PL, then make installdeps - this will ensure that any non-core dependencies needed are installed with their dependencies in a correctly self contained manor.
If you install dependencies using shell.sh, then you can get into trouble if your local system perl already has some of the dependencies, then these will not be bundled with your application as expected.
Disabling local::lib mode:
You can totally disable local::lib mode just by deleting the generated local-lib5 directory.
It is possible do totally disable local::lib on a temporary basis by setting the CATALYST_LOCAL_LIB environment variable to 0
COPYRIGHT AND LICENSE
Copyright 2009 Tomas Doran. Some Rights Reserved
These scripts free software; you may redistribute it and/or modify them under the same terms as Perl itself