我可以使用 Catalyst 显示图像或图表吗?
我有一个基于 Perl/CGI 脚本的简单 Web 服务器,主要用于显示图形和图像。我希望使其更具技术性并了解 Catalyst。我已在测试平台上安装了所有必需的 Perl 模块,并创建了一个名为 myweb 的应用程序。另外,我正在浏览 Catalyst 文件以实现我的目标,但还没有任何帮助。
- Catalyst对展示有帮助吗 网络上的图像/图表?
- 我如何使用现有的 CGI/Perl 带有 Catalyst 的脚本?
任何例子将非常感激。
I have simple Perl/CGI scripts based web server which is mainly used to display graphs and images. I am looking to make it more technical and come to know about Catalyst. I have installed all the required Perl modules on my test platform and created an application called myweb. Also, I am going through the Catalyst documents to reach my goal but nothing helpful yet.
- Is Catalyst helpful to display
images/graphs on web? - How can I use my existing CGI/Perl
scritps with Catalyst?
Any example would be really appreciated.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
Catalyst 对在 Web 上显示图像/图表有帮助吗?
您当前在 CGI 脚本中执行的任何操作也将在 Catalyst(视图)中以相同的方式工作。
但是,您可以通过使用已经规定的
Catalyst::View
。如何在 Catalyst 中使用我现有的 cgi/perl 脚本?
您可以使用
Catalyst::Controller::CGIBin
但是,要充分利用 Catalyst
MVC
那么重写会更好将 CGI 脚本写入必要的组件部分(模型、视图和控制器)。Is Catalyst helpful to display images/graphs on web?
Whatever you currently do in your CGI script will also work in same way within Catalyst (view).
However you can improve/change your method by using an already prescribed
Catalyst::View
from CPAN.How to use my existing cgi/perl scritps with Catalyst?
You can just embed your CGI script within Catalyst using
Catalyst::Controller::CGIBin
However to get the full benefits of Catalyst
MVC
then it would be better to rewrite you CGI script into necessary component parts (Model, View & Controller).查看 Catalyst::View::Graphics::Primitive 了解图形内容 Catalyst。
Check out Catalyst::View::Graphics::Primitive for graphics stuff Catalyst.
我个人使用 Catalyst::View::Jemplate
这使我的控制器逻辑完全独立于我使用的图形/图表 API 类型。
事实上,我每隔几个月就会改变图表的外观和感觉,只是因为我可以..
I personally use Catalyst::View::Jemplate
This keeps my controller logic completely independent of what type of graph/chart API I use.
In fact, I change the graph look and feel every few months just because i can..