Bash function for directory-dependent local::lib
On my laptop I use perlbrew to keep my system perl separate from my development perl. But I also develop various Perl projects with different dependencies, and would like to keep those dependencies separate if possible. Using a separate perlbrew perl for each project as well would be overkill in terms of diskspace, CPU energy and time so I thought local::lib might be useful.
If I install dependencies for a particular project using "cpanm -l extlib $MODULE" in the top level directory, the function below will automatically setup local::lib for that location when I change into that direc…