Perl: how to share the import of a large list of modules between many independent scripts?

后端 未结 5 893
梦如初夏
梦如初夏 2021-01-12 10:40

I have many standalone scripts. The only thing they share, is that they use() a large set of CPAN modules (that each export several functions). I would like to centralize th

5条回答
  •  太阳男子
    2021-01-12 11:28

    File import.pl:

    require blah;  blah->import;
    require blubb; blubb->import;
    

    Skripts:

    #!/usr/bin/perl
    do 'import.pl'
    ...
    

    Patrick

提交回复
热议问题