1
我有一个Perl脚本test.pl,它包含另一个Perl模块fact.pm,它位于crypt/Module目录下。 隐窝/ test.pl的源代码是:PAR包装器不包括用户定义的模块
#!/usr/bin/perl
use Term::ANSIColor qw(:constants);
use File::Path;
use POSIX qw(strftime);
use File::Basename qw(dirname);
use Cwd qw(abs_path);
use lib dirname(dirname abs_path $0);
use crypt::Module::fact qw(factorial);
&factorial();#function present in fact.pm
print("Thanks for that thought \n");
给出的PAR打包机命令
pp -M Module::fact -o test test.pl
抄袭只是一个不同的目录路径上的可执行测试和执行它我收到以下错误:
Can't locate crypt/Module/fact.pm in @INC (you may need to install the crypt::Module::fact module)
如何将模块包含在可执行文件中?