how to import multiple custom modules in our own perl script?

≡放荡痞女 提交于 2019-12-02 05:12:40

You can use this small script to load all 100 modules into it:

# pragma
use strict;
use warnings;

# standard modules needed by the script
use Module::Load;

# the loop below loads all 100 of your custom modules (file1.pm, file2.pm, ...)
foreach my $i (1 .. 100)
{
    load "file$i";
}

As I said in a comment, I think this is a terrible way to organise your codebase. But assuming that you can't do anything about that, you might want to look at the Toolkit module.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!