perl -MCPAN -e ‘install Module::Build‘
perl -MCPAN -e ‘install Config::IniFiles‘
config模块使用方法:
use Config::IniFiles; my $cfg = Config::IniFiles->new( -file => "config.ini") ; if ($cfg){ my $username = $cfg->val( ‘auth‘, ‘username‘ ) ; # print "用户名:". $username ; # say ""; }else{ say "请确认配置文件是否存在,退出任务!"; exit; }
时间: 2024-10-13 05:31:54