哪个 Perl 会话管理库与 TemplateToolkit 配合得很好?

发布于 2024-07-29 12:57:32 字数 867 浏览 2 评论 0原文

我考虑过 CGI::Application 和 < a href="http://search.cpan.org/perldoc?CGI::Session" rel="nofollow noreferrer">CGI::Session。 两者中, CGI::Session 似乎更有希望。 然而 CGI::Application 模型却没有看起来它与模板工具包配合得很好。 (我这样想是不是错了?)

我想在提交一个会话管理库之前评估更多会话管理库。 有什么建议吗? 我正在寻找一个与 Web 服务器无关且可跨多个服务器工作的库。 Catalyst 目前不是一个选项,因为需要时间将现有代码改造为 Catalyst 做事的方式。

I've considered CGI::Application and CGI::Session. Of the two, CGI::Session seems more promising. CGI::Application model, however, doesn't look like it would work well with Template Toolkit. (Am I wrong to think so?)

I would like to evaluate more session management libraries, before comitting to one. Any recommendations? I'm looking for a library that's web server agnostic, and works across multiple servers. Catalyst is not an option for now, due to the time required to retrofit existing code into the Catalyst way of doing things.

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

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

发布评论

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

评论(2

荒人说梦 2024-08-05 12:57:32

CGI::ApplicationCGI::Session 是非常不同的模块。 CGI::Session 是一个会话模块 - 它不做任何超出此范围的事情。 CGI::Application 是一个轻量级框架。 它与模板工具包配合使用,我们中的一些人与CGI::Application::Plugin::TT

因此,如果您只需要会话,请使用 CGI::Session。

如果您需要更好的代码结构 - 使用 CGI::Application。 你甚至可以在其中使用CGI::Session,配合CGI::Application::Plugin::Session。

CGI::Application and CGI::Session are very different modules. CGI::Session is a session module - it does not do anything beyond this. CGI::Application is a lightweight framework. It works well with Template Toolkit, some of us use with CGI::Application::Plugin::TT.

So, if you need sessions only, use CGI::Session.

If you need better structure of your code - use CGI::Application. You can even use CGI::Session in it, with CGI::Application::Plugin::Session.

执手闯天涯 2024-08-05 12:57:32

我使用 Apache::Session 取得了一些成功。 尽管这个名字讲述了一个不同的故事,但我认为它不仅仅适用于 Apache 网络服务器。

好处是您可以轻松更改会话存储方式,而无需更改自己的会话处理代码。 例如,您可能首先将会话存储为磁盘上的文件,然后转移到基于数据库的系统。 然后更改数据库后端。

I have used Apache::Session with some success. Although the name tells a different story, I don't think it will only work with an Apache webserver.

The nice thing is that you can easily change the way sessions are stored without changing your own session handling code. E.g. you might start out with sessions being stored as files on disk and then move to a DB based system. And then change the DB backend after that.

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