0
最近我正在調試一段代碼,發現模板中模板工具箱用法中的下列用法。perl語法來訪問cgi腳本中的常量變量
#Constants.pm
# Bugzilla version
use constant BUGZILLA_VERSION => "4.0.11";
#template file index.html.tmpl
[% PROCESS global/header.html.tmpl
header_addl_info = "version $constants.BUGZILLA_VERSION"
style_urls = [ 'skins/standard/index.css' ]
%]
#index.cgi
use Bugzilla::Constants;
.......
print "buzilla version : $constants.BUGZILLA_VERSION <br/>";
當我使用主CGI腳本相同的語法,給錯誤500