小编blu*_*ues的帖子

POET中的全局变量mason2

我是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)

mason poet

6
推荐指数
1
解决办法
206
查看次数

标签 统计

mason ×1

poet ×1