[Ottawa-pm] virtualenv equivalent
Michael P. Soulier
msoulier at digitaltorque.ca
Fri Dec 23 18:44:16 PST 2011
On 23/12/11 Yanick Champoux said:
> If you want them truly segregated, perlbrew (App::perlbrew) is a
> great tool.
Must look into it then.
> But if you just want to have different groups of modules,
> local::lib should do what you want. Can you elaborate on how it
> "just ain't the same" than virtualenv (I never used virtualenv
> before, so I wouldn't know)?
I want a tool that allows me to essentially set up a new shell with a new
environment without any modification of my code. virtualenv permits a custom
interpreter with custom modules, and I'm hoping that I can find something
similar.
With my modules at ~/perl5, this does most of what I want...
msoulier at egor:/home/msoulier$ cat mojoenv.sh
ORIGPATH=$PATH
ORIGPS1=$PS1
deactivate() {
export PATH=$ORIGPATH
export PS1=$ORIGPS1
}
export PATH=$PATH:$HOME/perl5/bin
export PERL5LIB=$HOME/perl5/lib/perl5
export PS1="(mojo)$PS1"
now I just need to easily install modules at each needed subdirectory, like
~/envs/client1 ~/envs/client2, etc...
Anyway, some cool stuff in Mojolicious::Lite. I just shipped a website in one
file. Not necessarily a good thing for large projects, but for small ones it's
kinda cool. Even base64-encoded images inline.
Mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://mail.pm.org/pipermail/ottawa-pm/attachments/20111223/32d3815b/attachment.bin>
More information about the Ottawa-pm
mailing list