是否有使用 HTML::Template 而不是 TT 的 Catalyst 教程?

发布于 2024-07-18 00:33:54 字数 299 浏览 4 评论 0原文

我一直在浏览一些 Catalyst 教程,它们都倾向于使用 Template Toolkit 而不是 HTML::Template。

我在 HTML::Template 上花了很多时间,我喜欢它,虽然我可以看到 TT 的强大功能,但我并不知道它,而且我觉得我会同时学习两件事; 另外,因为它在模板中进行处理,所以我不确定我的 HTML::Template $template->param(foo => \$bar); 代码会去哪里!

有人知道使用 HTML::Template 的好教程/代码示例吗?

I've been looking through a couple of Catalyst tutorials and they all tend to use Template Toolkit instead of HTML::Template.

I've spent a lot of time with HTML::Template and I like it, and while I can see the power of TT, I don't know it, and I feel like I'd be learning two things at once; plus, because it does its processing in-template, I'm not sure where my HTML::Template $template->param(foo => \$bar); code would even go!

Anyone know a good tutorial/code sample using HTML::Template?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

海拔太高太耀眼 2024-07-25 00:33:54

当然,关于 Catalyst::View::HTML::Template 有点稀疏,它本身不是教程,但它确实涵盖了配置基本的 HTML::Template 设置(die_on_bad_params,等)并指出“模板参数是根据 $c->stash 的内容设置的”,在我看来,这应该足以让您开始。

Granted, the documentation on Catalyst::View::HTML::Template is a little sparse and it's not a tutorial per se, but it does cover configuring the basic HTML::Template settings (die_on_bad_params, etc.) and states that "Template params are set up from the contents of $c->stash", which looks to me like it should be enough to get you started.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文