我是Mason2/POET的新手,我一直在使用本指南http://search.cpan.org/~jswartz/Poet/lib/Poet/Manual/Tutorial.pod来创建我的第一个网站.
现在我想创建一个新的全局变量(例如:$ User)但是我不知道或者我应该采取什么方向这样做,因为文档没有解释它.我发现的大多数文档都是关于Apache或mod_perl ...
我正在寻找的例子:
<%augment wrap>
<html>
html code goes here
</html>
</%augment>
<%init>
my $User;
Mason::Interp::allow_globals => [qw($User)];
</%init>
Run Code Online (Sandbox Code Playgroud)