简体   繁体   中英

Can I use Catalyst to display images or graphs?

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.

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 for graphics stuff Catalyst。

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM