How can I install specialized environments for different Perl applications?

后端 未结 8 1272
轻奢々
轻奢々 2021-01-31 19:00

Is there anything equivalent or close in terms of functionality to Python\'s virtualenv, but for Perl?

I\'ve done some development in Python and a possibility of having

8条回答
  •  执念已碎
    2021-01-31 19:53

    There's a tool called local::lib that wraps up all of the work for you, much like virtualenv. It will:

    • Set up @INC in the process where it's used.
    • Set PERL5LIB and other such things for child processes.
    • Set the right variables to convince CPAN, MakeMaker, Module::Build, etc. to install libraries and store configuration in a local directory.
    • Set PATH so that installed binaries can be found.
    • Print environment variables to stdout when used from the commandline so that you can put eval $(perl -Mlocal::lib) in your .profile and then mostly forget about it.

提交回复
热议问题