How can I use the Environment Modules system in Perl?

前端 未结 3 786
遥遥无期
遥遥无期 2021-01-19 11:50

How can one use the Environment Modules system* in Perl?

Running

system(\"load module \");

does not work,

3条回答
  •  醉酒成梦
    2021-01-19 12:45

    It looks like the Perl module Env::Modulecmd will do what you want. From the documentation:

    Env::Modulecmd provides an automated interface to modulecmd from Perl. The most straightforward use of Env::Modulecmd is for loading and unloading modules at compile time, although many other uses are provided.

    Example usage:

     use Env::Modulecmd { load => 'foo/1.0' };
    

提交回复
热议问题