我可以使用 Catalyst 显示图像或图表吗?

发布于 2024-08-31 06:22:08 字数 267 浏览 4 评论 0原文

我有一个基于 Perl/CGI 脚本的简单 Web 服务器,主要用于显示图形和图像。我希望使其更具技术性并了解 Catalyst。我已在测试平台上安装了所有必需的 Perl 模块,并创建了一个名为 myweb 的应用程序。另外,我正在浏览 Catalyst 文件以实现我的目标,但还没有任何帮助。

  1. Catalyst对展示有帮助吗 网络上的图像/图表?
  2. 我如何使用现有的 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.

  1. Is Catalyst helpful to display
    images/graphs on web?
  2. How can I use my existing CGI/Perl
    scritps with Catalyst?

Any example would be really appreciated.

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

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

发布评论

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

评论(3

兮子 2024-09-07 06:22:08

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).

ゃ懵逼小萝莉 2024-09-07 06:22:08

查看 Catalyst::View::Graphics::Primitive 了解图形内容 Catalyst。

Check out Catalyst::View::Graphics::Primitive for graphics stuff Catalyst.

離殇 2024-09-07 06:22:08

我个人使用 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..

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